Commit 5727f77e by BellCodeEditor

save project

parent c88802de
Showing with 10 additions and 9 deletions
......@@ -21,6 +21,15 @@ while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
if event.type == locals.MOUSEBUTTONDOWN:
if click == 0:
click = 1
pygame.mixer.music.pause()
play_botton = play
else:
click = 0
pygame.mixer.music.unpause()
play_botton = stop
if event.type == locals.KEYDOWN:
if event.key == locals.K_DOWN:
if volume > 0:
......@@ -30,15 +39,7 @@ while True:
if volume < 1:
volume += 0.01
pygame.mixer.music.set_volume(volume)
if event.type == locals.MOUSEBUTTONDOWN:
if click == 0:
click = 1
pygame.mixer.music.pause()
play_botton = play
else:
click = 0
pygame.mixer.music.unpause()
play_botton = stop
if pygame.mixer.music.get_busy() == False:
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