Commit bbebf5e0 by BellCodeEditor

save project

parent b431e3de
Showing with 11 additions and 6 deletions
......@@ -25,7 +25,7 @@ volume = 0.2
pygame.mixer.music.set_volume(volume) # 初始播放音量
click = 0
play_button = stop_img
a=1
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
......@@ -51,12 +51,9 @@ while True:
if click % 2 == 0:
play_button = stop_img
pygame.mixer.music.unpause()
a=0
else:
play_button = play_img
pygame.mixer.music.pause()
a=1
if x > 420 and x < 520 and y > 350 and y < 400: # 下一曲
num += 1
if num > len(music_list) - 1:
......@@ -87,11 +84,18 @@ while True:
num = 0
pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play()
music_length=int(music_length)
play_time=pygame.mixer.music.get_pos()
play_time=int(play_time/1000)
play_m=play_time//60
play_s=play_time%60
info=str(play_m)+":"+str(play_s)
music_m=play_time//60
music_s=play_time%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])
......@@ -112,4 +116,5 @@ while True:
# 刷新画面
pygame.display.update()
\ No newline at end of file
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