Commit 6c554e33 by BellCodeEditor

save project

parent dc1ce871
Showing with 18 additions and 10 deletions
......@@ -63,11 +63,9 @@ while True:
pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play()
play_button = stop_img
if click % 2 == 0:
click += 2
else:
click += 1
music1=pygame.mixer.Sound(path + "\\" + music_list[num])
music_length=music1.get_length()
music_length=int(music_length)
if x > 120 and x < 220 and y > 350 and y < 400: # 上一曲
num -= 1
if num < 0:
......@@ -75,10 +73,10 @@ while True:
pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play()
play_button = stop_img
if click % 2 == 0:
click += 2
else:
click += 1
music1=pygame.mixer.Sound(path + "\\" + music_list[num])
music_length=music1.get_length()
music_length=int(music_length)
if pygame.mixer.music.get_busy() == False:
num += 1
......@@ -90,7 +88,14 @@ while True:
p_t=int(p_t/1000)
p_m=p_t//60
p_s=p_t%60
if p_s<10:
p_s="0"+str(p_s)
info=str(p_m)+":"+str(p_s)
m_m=music_length//60
m_s=music_length%60
if m_s<10:
m_s="0"+str(m_s)
info2=str(m_m)+":"+str(m_s)
# 绘制画面\
new_logo=pygame.transform.rotate(logo_img,angle)
newrect=new_logo.get_rect(center=(320,200))
......@@ -103,7 +108,9 @@ while True:
screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350))
scoresurf=basic_font.render(info,True,(255,255,255))
screen.blit(scoresurf,(120,440)) # 下一曲
screen.blit(scoresurf,(120,440))
scoresurf2=basic_font.render("/"+info2+True(0,0,0))
screen.blit(scoresurf2,(170,440)) # 下一曲
# 刷新画面
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