Commit e38a9153 by BellCodeEditor

save project

parent 9f1273f1
Showing with 10 additions and 2 deletions
...@@ -12,7 +12,7 @@ stop_img = pygame.image.load('stop.png') # 暂停按钮 ...@@ -12,7 +12,7 @@ stop_img = pygame.image.load('stop.png') # 暂停按钮
last_img = pygame.image.load('last.png') # 上一曲按钮 last_img = pygame.image.load('last.png') # 上一曲按钮
next_img = pygame.image.load('next.png') # 下一曲按钮 next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮 logo_img = pygame.image.load('logo.png') # 下一曲按钮
font=pygame.font.Font('neuropol.ttf',15)
music_list = [] music_list = []
path = r"C:\Users\Administrator\Desktop\songs" path = r"C:\Users\Administrator\Desktop\songs"
filelist = os.listdir(path) filelist = os.listdir(path)
...@@ -88,11 +88,19 @@ while True: ...@@ -88,11 +88,19 @@ while True:
pose=(new_rect[0],new_rect[1]) pose=(new_rect[0],new_rect[1])
if click%2==0: if click%2==0:
angle += 1 angle += 1
pos=int(pygame.mixer.music.get_pos()/1000)
pos_m=str(pos//60)
pos_s=str(pos%60)
if pos&60<10:
pos_s='0'+pos_s
play_time=pos_m+':'+pos_s
text=font.render(play_time,True,(255,255,255))
screen.blit(bg_img, (0, 0)) screen.blit(bg_img, (0, 0))
screen.blit(play_button, (270, 330)) screen.blit(play_button, (270, 330))
screen.blit(new_logo,pose) screen.blit(new_logo,pose)
screen.blit(last_img, (120, 350)) screen.blit(last_img, (120, 350))
screen.blit(next_img, (420, 350)) screen.blit(next_img, (420, 350))
screen.blit(text,(50,400))
pygame.display.update() pygame.display.update()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment