Commit 24c4044b by BellCodeEditor

save project

parent 57c367f6
Showing with 12 additions and 0 deletions
......@@ -30,6 +30,17 @@ while True:
pygame.mixer_music.set_volume(sound)
if pygame.mixer.music.get_busy()==False:
pygame.mixer.music.play()
if event.type==locals.MOUSEBUTTONDOWN:
if event.button==1:
x,y = event.pos
if x > 270 and x < 370 and y > 350 and x < 450:
click += 1
if click % 2 ==0:
play_button= img_img
pygame.mixer.music.unpause()
else:
play_button=play_img()
# 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景
screen.blit(stop_img, (270, 330)) # 暂停按钮
......@@ -38,3 +49,4 @@ while True:
screen.blit(next_img, (420, 350)) # 下一曲
# 刷新画面
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