Commit b4805f81 by BellCodeEditor

save project

parent 95663d40
Showing with 11 additions and 3 deletions
......@@ -14,6 +14,7 @@ next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮
music_list = []
font = pygame.font.Font('neuropol.ttf',15)
path = "C:\\Users\\zjs_0\\Desktop\\test"
filelist = os.listdir(path)
num = -1
......@@ -89,7 +90,13 @@ while True:
pos = (newRect[0],newRect[1])
if play_button == stop_img:
angle-=1
play_time = pygame.mixer.music.get_pos()
play_time = int(play_time/1000)
play_m = play_time//60
play_s =play_time%60
if play_s<10:
play_s = '0'+str(play_s)
info = str(play_m)+':'+str(play_s)
# 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景
screen.blit(play_button, (270, 330)) # 暂停按钮
......@@ -97,5 +104,7 @@ while True:
screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲
# 刷新画面
play_time = font.render(info,True,(255,255,255))
screen.blit(play_time,(120,440))
pygame.display.update()
fps.tick(60)
\ No newline at end of file
fps.tick(60)
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