Commit 392cf437 by BellCodeEditor

save project

parent 9e62705f
Showing with 1 additions and 10 deletions
...@@ -21,7 +21,7 @@ for i in filelist: ...@@ -21,7 +21,7 @@ for i in filelist:
if i[-4:] == ".wav" or i[-4:] == ".ogg": if i[-4:] == ".wav" or i[-4:] == ".ogg":
music_list.append(i) music_list.append(i)
volume = 0.2 volume = 0.2
pygame.mixer.music.set_volume(volume) # 初始播放音量 pygame.mixer.music.set_volume(volume) # 初始播放音量
click = 0 click = 0
play_button = stop_img play_button = stop_img
...@@ -85,16 +85,7 @@ while True: ...@@ -85,16 +85,7 @@ 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()
a=pygame.mixer.music.get_pos()
play_time=int(play_time//1000)
play_m=play_time//60
play_s=a%60
b=str(play_m)+":"+str(play_s)
e=pygame.font.Font("neurpool.ttf",13)
a1=e.render(a,true,(0,0,2))
# 绘制画面 # 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景 screen.blit(bg_img, (0, 0)) # 填充背景
screen.blit(play_button, (270, 330)) # 暂停按钮 screen.blit(play_button, (270, 330)) # 暂停按钮
......
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