Commit 1eb4d449 by BellCodeEditor

save project

parent 55b269af
Showing with 14 additions and 0 deletions
......@@ -13,10 +13,15 @@ next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 中间logo
pygame.mixer.music.load('歌曲3.wav')
b = 0
play_buttenb = play_img
a = 0.2
pygame.mixer.music.set_volume(a)
click = 0
play_button = stop_img
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
......@@ -35,6 +40,15 @@ while True:
a = 0
pygame.mixer.music.set_volume(a)
if event.type == locals.MOUSEBUTTONDOWN:
b += 1
if b%2 == 0:
pygame.mixer.music.unpause()
play_button = stop_img
else:
pygame.mixer.music.pause()
play_button = play_img
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