Commit c27a6369 by BellCodeEditor

save project

parent 3672d6af
Showing with 10 additions and 7 deletions
...@@ -36,7 +36,7 @@ while True: ...@@ -36,7 +36,7 @@ while True:
pla_time=int(pla_time) pla_time=int(pla_time)
pla_m = pla_time//60 pla_m = pla_time//60
pla_s = pla_time%60 pla_s = pla_time%60
inf = str(pla_m)+":"+str(pla_s) inf = " / "+str(pla_m)+":"+str(pla_s)
exit() exit()
# 按键,控制声音大小 # 按键,控制声音大小
if event.type == locals.KEYDOWN: if event.type == locals.KEYDOWN:
...@@ -74,10 +74,11 @@ while True: ...@@ -74,10 +74,11 @@ while True:
else: else:
click += 1 click += 1
play=pygame.mixer.Sound(path+"\\"+music_list[num]) play=pygame.mixer.Sound(path+"\\"+music_list[num])
pla_time=play.get_length() pla_time=play.get_length()
pla_time=int(pla_time)
pla_m = pla_time//60 pla_m = pla_time//60
pla_s = pla_time%60 pla_s = pla_time%60
inf = str(pla_m)+":"+str(pla_s) inf = " / "+str(pla_m)+":"+str(pla_s)
if click%2==0: if click%2==0:
angle += 1 angle += 1
if x > 120 and x < 220 and y > 350 and y < 400: # 上一曲 if x > 120 and x < 220 and y > 350 and y < 400: # 上一曲
...@@ -92,10 +93,11 @@ while True: ...@@ -92,10 +93,11 @@ while True:
else: else:
click += 1 click += 1
play=pygame.mixer.Sound(path+"\\"+music_list[num]) play=pygame.mixer.Sound(path+"\\"+music_list[num])
pla_time=play.get_length() pla_time=play.get_length()
pla_time=int(pla_time)
pla_m = pla_time//60 pla_m = pla_time//60
pla_s = pla_time%60 pla_s = pla_time%60
inf = str(pla_m)+":"+str(pla_s) inf = " / "+str(pla_m)+":"+str(pla_s)
if pygame.mixer.music.get_busy() == False: if pygame.mixer.music.get_busy() == False:
num += 1 num += 1
if num > len(music_list)-1: if num > len(music_list)-1:
...@@ -109,10 +111,11 @@ while True: ...@@ -109,10 +111,11 @@ while True:
play_s = play_time%60 play_s = play_time%60
info = str(play_m)+":"+str(play_s) info = str(play_m)+":"+str(play_s)
play=pygame.mixer.Sound(path+"\\"+music_list[num]) play=pygame.mixer.Sound(path+"\\"+music_list[num])
pla_time=play.get_length() pla_time=play.get_length()
pla_time=int(pla_time)
pla_m = pla_time//60 pla_m = pla_time//60
pla_s = pla_time%60 pla_s = pla_time%60
inf = str(pla_m)+":"+str(pla_s) inf = " / "+str(pla_m)+":"+str(pla_s)
new_logo= pygame.transform.rotate(logo_img,angle) new_logo= pygame.transform.rotate(logo_img,angle)
newrect=new_logo.get_rect(center=(320,200)) newrect=new_logo.get_rect(center=(320,200))
if click%2==0: if click%2==0:
......
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