Commit a8337ea0 by BellCodeEditor

save project

parent 4f8e67f2
Showing with 11 additions and 0 deletions
......@@ -14,6 +14,7 @@ next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮
angle=0
a=pygame.font.Font('neuropol.ttf',15)
music_list = []
path = "C:\\Users\\Hanson Zhang\\Desktop\\音乐播放器"
filelist = os.listdir(path)
......@@ -90,6 +91,14 @@ while True:
pos=(newRect[0],newRect[1])
if play_button==stop_img:
angle+=1
playtime=int(pygame.mixer.music.get_pos()/1000)
playm=playtime//60
plays=playtime%60
if plays<10:
plays='0'+str(plays)
info1=str(playm)+':'+str(plays)
text1=a.render(info1,True,(255,255,255))
# 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景
......@@ -97,5 +106,6 @@ while True:
screen.blit(newlogo,pos) # 中间logo图
screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲
screen.blit(text1,(120,420))
# 刷新画面
pygame.display.update()
\ No newline at end of file
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