Commit 9619fa9e by BellCodeEditor

save project

parent 306cefda
Showing with 11 additions and 0 deletions
...@@ -71,6 +71,9 @@ while True: ...@@ -71,6 +71,9 @@ while True:
num = len(music_list) - 1 num = len(music_list) - 1
pygame.mixer.music.load(path + "\\" + music_list[num]) pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play() pygame.mixer.music.play()
music1 = pygame.mixer.mixer.sound(music——list[num])
music_length = music1.get_length()
music_length = int(music_length)
play_button = stop_img play_button = stop_img
if click % 2 == 0: if click % 2 == 0:
click += 2 click += 2
...@@ -83,12 +86,20 @@ while True: ...@@ -83,12 +86,20 @@ while True:
num = 0 num = 0
pygame.mixer.music.load(path + "\\" + music_list[num]) pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play() pygame.mixer.music.play()
music1 = pygame.mixer.Sound(music_list[num])
music_length = music1.get_length()
music_length = int(music_length)
play_time = pygame.music.get_pos() play_time = pygame.music.get_pos()
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
info = str(play_m) + ":" + str(play_s) info = str(play_m) + ":" + str(play_s)
music_m = muslc_length//60
music_s = music_length%60
info2 = str(music_m)+":"+str(music_s)
# 绘制画面 # 绘制画面
new_logo = pygame.transform.rotate(logo_ing, angle) new_logo = pygame.transform.rotate(logo_ing, angle)
newRect = new_logo.get_rect=(320,200)) newRect = new_logo.get_rect=(320,200))
......
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