Commit d670652d by BellCodeEditor

save project

parent 8ff7b3a7
Showing with 11 additions and 6 deletions
...@@ -33,7 +33,9 @@ while True: ...@@ -33,7 +33,9 @@ while True:
play_time=int(play_time/1000) play_time=int(play_time/1000)
play_m=play_time//60 play_m=play_time//60
play_s=play_time%60 play_s=play_time%60
music_len=music.get_length()
m=music_len//60
s=music_len%60
for event in pygame.event.get(): for event in pygame.event.get():
if event.type == locals.QUIT: if event.type == locals.QUIT:
...@@ -107,13 +109,15 @@ while True: ...@@ -107,13 +109,15 @@ while True:
screen.blit(new_logo, (pos)) # 中间logo图 screen.blit(new_logo, (pos)) # 中间logo图
screen.blit(last_img, (120, 350)) # 上一曲 screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) screen.blit(next_img, (420, 350))
music_len=music.get_length()
if play_s<10: if play_s<10:
info=str(play_m)+":"+"0"+str(play_s)+"/"+str(int(music_len)) info=str(play_m)+":"+"0"+str(play_s)
else: else:
info=str(play_m)+":"+str(play_s)+"/"+str(int(music_len)) info=str(play_m)+":"+str(play_s)
text=my_font.render(info,True,(0,0,0)) info2="/"+str(int(m))+":"+str(int(s))
text=my_font.render(info,True,(0,0,0)) text=my_font.render(info,True,(0,0,0))
screen.blit(text,(320,440)) # 下一曲 text1=my_font.render(info2,True,(255,255,255))
screen.blit(text,(320,440))
screen.blit(text1,(400,440)) # 下一曲
# 刷新画面 # 刷新画面
pygame.display.update() 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