Commit d9a5e245 by BellCodeEditor

save project

parent 3282dbff
Showing with 6 additions and 4 deletions
...@@ -12,8 +12,10 @@ last_img = pygame.image.load('last.png') # 上一曲按钮 ...@@ -12,8 +12,10 @@ 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 logo_img = pygame.image.load('logo.png') # 中间logo
pygame.mixer.music.load('歌曲4.ogg') pygame.mixer.music.load('歌曲4.ogg')
strt = stop_ing strt = stop_img
click = 0 click = 0
volume = 0.2
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
...@@ -25,12 +27,12 @@ while True: ...@@ -25,12 +27,12 @@ while True:
if event.key == locals.K_UP: if event.key == locals.K_UP:
volume += 0.1 volume += 0.1
if volume > 1: if volume > 1:
volume = 1 volume = 1
pygame.mixer.music.set_volume(volume) pygame.mixer.music.set_volume(volume)
if event.key == locals.KEYDOWN: if event.key == locals.KEYDOWN:
volume -= 0.1 volume -= 0.1
if volume < 1: if volume < 1:
volume = 1 volume = 1
pygame.mixer.music.set_volume(volume) pygame.mixer.music.set_volume(volume)
if event.type == locals.MOUSEBUTTONDOWN: if event.type == locals.MOUSEBUTTONDOWN:
click += 1 click += 1
...@@ -39,7 +41,7 @@ while True: ...@@ -39,7 +41,7 @@ while True:
start = stop_ing start = stop_ing
else: else:
pygame.mixer.music.unpause() pygame.mixer.music.unpause()
start = play_ing start = play_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