Commit e204a936 by BellCodeEditor

save project

parent b185029d
Showing with 8 additions and 6 deletions
......@@ -12,7 +12,8 @@ last_img = pygame.image.load('last.png') # 上一曲按钮
next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 中间logo
pygame.mixer.music.load('歌曲4.ogg')
volume=0
click=0
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
......@@ -30,12 +31,13 @@ while True:
if volume<0:
volume=o
pygame.mixer.music.set_volume(volume)
if event.type==locals.MOUSEBUTTONDOWN:
click+=1
if click % 2 == 0:
pygame.mixer.music.urpause()
else:
pygame.mixer.music.pause()
if click % 2 == 0:
pygame.mixer.music.urpause()
else:
pygame.mixer.music.pause()
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