Commit d36ae17d by BellCodeEditor

save project

parent a8361d4a
Showing with 8 additions and 1 deletions
...@@ -13,8 +13,11 @@ next_img = pygame.image.load('next.png') # 下一曲按钮 ...@@ -13,8 +13,11 @@ next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮 logo_img = pygame.image.load('logo.png') # 下一曲按钮
# 载入音乐 # 载入音乐
pygame.mixer.music.load('新建文件夹') # 载入音乐 # 载入音乐
music_list=[]
path="C:\Users\Administrator\Desktop\"
a=os.listdir(path)
volume = 0.2 volume = 0.2
pygame.mixer.music.set_volume(volume) # 初始播放音量 pygame.mixer.music.set_volume(volume) # 初始播放音量
click = 0 click = 0
...@@ -51,6 +54,10 @@ while True: ...@@ -51,6 +54,10 @@ while True:
num=1 num=1
if num<0: if num<0:
num=len(music_list)-1 num=len(music_list)-1
if x <420 and x <520 and y > 350 and y < 450:
num=1
if num>10:
num=len(music_list)+1
if pygame.mixer.music.get_busy() == False: if pygame.mixer.music.get_busy() == False:
pygame.mixer.music.play() pygame.mixer.music.play()
......
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