Commit 75ad9be0 by BellCodeEditor

save project

parent a6917357
Showing with 10 additions and 4 deletions
...@@ -51,9 +51,13 @@ while True: ...@@ -51,9 +51,13 @@ while True:
click += 1 click += 1
if click % 2 == 0: if click % 2 == 0:
play_button = stop_img play_button = stop_img
pygame.mixer.music.unpause()
else: else:
play_button = play_img play_button = play_img
pygame.mixer.music.pause() pygame.mixer.music.pause()
if x > 420 and x < 520 and y > 350 and y < 400: # 下一曲 if x > 420 and x < 520 and y > 350 and y < 400: # 下一曲
num += 1 num += 1
...@@ -91,11 +95,13 @@ while True: ...@@ -91,11 +95,13 @@ while True:
newloge=pygame.transform.rotate(logo_img,angle) newloge=pygame.transform.rotate(logo_img,angle)
newRect=newloge.get_rect(center=(320,200)) newRect=newloge.get_rect(center=(320,200))
pos=(newRect[0],newRect[1]) pos=(newRect[0],newRect[1])
angle+=1 if play_button == stop_img:
angle+=1
screen.blit(bg_img, (0, 0)) # 填充背景 screen.blit(bg_img, (0, 0)) # 填充背景
screen.blit(play_button, (270, 330)) # 暂停按钮 screen.blit(play_button, (270, 330)) # 暂停按钮
screen.blit(newloge, pos) # 中间logo图 screen.blit(newloge, pos) # 中间logo图
screen.blit(last_img, (120, 350)) # 上一曲 screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲 screen.blit(next_img, (420, 350)) # 下一曲
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
\ No newline at end of file # FPS.tick(60)
\ No newline at end of file
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