Commit ef32299c by BellCodeEditor

save project

parent 6889f7fb
Showing with 4 additions and 7 deletions
...@@ -8,7 +8,7 @@ stop_img = pygame.image.load('stop.png') ...@@ -8,7 +8,7 @@ stop_img = pygame.image.load('stop.png')
last_img = pygame.image.load('last.png') 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')
pygame.mixer_music.load('歌曲1.wav') pygame.mixer_music.load('歌曲3.wav')
volume=0.2 volume=0.2
pygame.mixer.music.set_volume(volume) pygame.mixer.music.set_volume(volume)
click=0 click=0
...@@ -18,12 +18,9 @@ while True: ...@@ -18,12 +18,9 @@ while True:
if event.type==locals.QUIT: if event.type==locals.QUIT:
exit() exit()
if event.type == locals.KEYDOWN: if event.type == locals.KEYDOWN:
if evant.key == locals.K_UP: if event.button==1:
volume += 0.2 x,y=event.pos
if volume<0: if x>270 and x<370 and y>350 and y<450:
volume=0
pygame.mixer.music_volume(volume)
if event.type == locals.MOUSEBUTTONDOWN:
click+=1 click+=1
if click%2==0: if click%2==0:
play_button=stop_img play_button=stop_img
......
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