Commit 92c76ca8 by BellCodeEditor

save project

parent f009fb2a
Showing with 14 additions and 1 deletions
......@@ -25,7 +25,7 @@ volume = 0.2
pygame.mixer.music.set_volume(volume) # 初始播放音量
click = 0
play_button = stop_img
music_length = 0
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
......@@ -54,6 +54,9 @@ while True:
else:
play_button = play_img
pygame.mixer.music.pause()
music1=pygame.mixer.sound(path+'\\'+music_list[num])
music_length = music1.get_length()
music_length = int(music_length)
if x > 420 and x < 520 and y > 350 and y < 400: # 下一曲
num += 1
if num > len(music_list) - 1:
......@@ -88,7 +91,17 @@ while True:
g=int(g/1000)
m=g//60
s=g%60
if s<10:
s="0"+str(s)
info = str(m)+":"+str(s)
music_m=music_length//60
music_s=music_length%60
if music_s<10:
music_s="0"+str(music_s)
info2 = str(music_m)+":"+str(music_s)
new_logo = pygame.transform.rotate(logo_img,angle)
newRect = new_logo.get_rect(center=(320,200))
pos = (newRect[0],newRect[1])
......
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