Commit de268504 by BellCodeEditor

auto save

parent e0725049
Showing with 7 additions and 0 deletions
...@@ -28,6 +28,12 @@ while True: ...@@ -28,6 +28,12 @@ while True:
if volume < 0: if volume < 0:
volume = 0 volume = 0
pygame.mixer_music.set_volume(volume) pygame.mixer_music.set_volume(volume)
if event.type ==locals.MOUSEBUTTONDOWN:
if event.button == 1:
x, y =event.pos
if x > 270 and x < 370 and y >350 and y <450:
click += 1
if click
if pygame.mixer_music.get_busy() == False: if pygame.mixer_music.get_busy() == False:
pygame.mixer_music.play() pygame.mixer_music.play()
# 绘制画面 # 绘制画面
...@@ -38,3 +44,4 @@ while True: ...@@ -38,3 +44,4 @@ while True:
screen.blit(next_img, (420, 350)) # 下一曲 screen.blit(next_img, (420, 350)) # 下一曲
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
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