Commit dd679523 by BellCodeEditor

save project

parent 7354564f
Showing with 16 additions and 1 deletions
...@@ -41,7 +41,22 @@ while True: ...@@ -41,7 +41,22 @@ while True:
if volume < 0: if volume < 0:
volume = 0 volume = 0
pygame.mixer.music.set_volume(volume) pygame.mixer.music.set_volume(volume)
if event.key == locals.K_LEFT:
num=num-1
if num<0:
num=len(music_list)-1
pygame.mixer.music.load(j+"//"+music_list[num])
pygame.mixer.music.play()
click=0
play_button=stop_img
if event.key==locals.K_RIGHT:
num=num+1
if num>len(music_list)-1:
num=0
pygame.mixer.music.load(j+"//"+music_list[num])
pygame.mixer.music.play()
click=0
play_button=stop_img
if event.type == locals.MOUSEBUTTONDOWN:#按下鼠标事件 if event.type == locals.MOUSEBUTTONDOWN:#按下鼠标事件
if event.button ==1: if event.button ==1:
x,y = event.pos x,y = event.pos
......
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