Commit 7e4c477c by BellCodeEditor

save project

parent 07e7f88a
Showing with 16 additions and 9 deletions
...@@ -13,7 +13,7 @@ last_img = pygame.image.load('last.png') # 上一曲按钮 ...@@ -13,7 +13,7 @@ last_img = pygame.image.load('last.png') # 上一曲按钮
next_img = pygame.image.load('next.png') # 下一曲按钮 next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮 logo_img = pygame.image.load('logo.png') # 下一曲按钮
num=-1 num=-1
path="C:\\Users\\Administrator\\Desktop\\nmb" path="C:\\Users\\student\\Desktop\\nmb"
filelist=os.listdir(path) filelist=os.listdir(path)
B=[] B=[]
for i in filelist: for i in filelist:
...@@ -67,17 +67,24 @@ while True: ...@@ -67,17 +67,24 @@ while True:
if num<0: if num<0:
num=len(B)-1 num=len(B)-1
click=2 click=2
pygame.mixer.music.load(path+"\\"+B[num]) pygame.mixer.music.load(path+"\\"+B[num])
pygame.mixer.music.play() pygame.mixer.music.play()
if x>420 and x<520 and y>350 and y<400:
num+=1
if num>len(B)-1:
num=0
pygame.mixer.music.load(path+"\\"+B[num])
pygame.mixer.music.play()
if pygame.mixer.music.get_busy() == False: if pygame.mixer.music.get_busy() == False:
num +=1
if num >len(B)-1:
num=0
pygame.mixer.music.load(path+"\\"+B[num])
pygame.mixer.music.play()
num = -1
if num >len(path)-1:
num=0
pygame.mixer.music.load(path+"\\"+B[num])
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