Commit 0c975148 by BellCodeEditor

save project

parent 46a2d816
Showing with 13 additions and 2 deletions
......@@ -14,7 +14,7 @@ next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮
# 载入音乐
music=["歌曲1.wav","歌曲2.wav","歌曲3.wav","歌曲4.ogg"]
music=[]
s="C:\\Users\\Lenovo\\Desktop\\text"
x=os.listdir(s)
for i in x:
......@@ -56,7 +56,18 @@ while True:
else:
play_button = play_img
pygame.mixer.music.pause()
if x>120 and x<220 and y>350 and y<450:
num-=1
if num<0:
num=len(music)-1
click=0
click=stop_img
elif x>420 and x<520 and y>350 and y<450:
num+=1
if num>len(music)-1:
num=0
click=1
click=play_img
if pygame.mixer.music.get_busy() == False:
num+=1
if num>len(music)-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