Commit 48ad36bb by BellCodeEditor

save project

parent 1617e29d
Showing with 11 additions and 6 deletions
...@@ -25,7 +25,7 @@ for i in Allfile: ...@@ -25,7 +25,7 @@ for i in Allfile:
musiclist.append(i) musiclist.append(i)
num=-1 num=-1
angle=0 angle=0
PSCLOCK = pygame.time.Clock()
...@@ -91,18 +91,22 @@ while True: ...@@ -91,18 +91,22 @@ while True:
pygame.mixer.music.play() pygame.mixer.music.play()
new_logo=pygame.transform.rotate(logo_img,angle) new_logo = pygame.transform.rotate(logo_img, angle)#静态图片 旋转角度
newRect=new_logo.get_rect(center=(320,200)) # 校正旋转图片的中心点
pos=(newRect[0],newRect[1]) newRect = new_logo.get_rect(center=(320, 200))#中心点
angle+=1 # print(newRect) # rect(170, 65, 300, 270) 左上角坐标、图片大小
pos = (newRect[0], newRect[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(logo_img, pos) # 中间logo图 screen.blit(new_logo, 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()
PSCLOCK.tick(30)
\ 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