Commit 86203d65 by BellCodeEditor

save project

parent f314aac7
Showing with 11 additions and 0 deletions
......@@ -28,6 +28,7 @@ click = 0
play_button = stop_img
angle=0
FPSCLOCK=pygame.time.Clock()
my_font=pygame.font.Font("neuropol.ttf",20)
while True:
for event in pygame.event.get():
......@@ -88,14 +89,24 @@ while True:
new_logo=pygame.transform.rotate(logo_img,angle)
new_rect=new_logo.get_rect(center=(320,200))
pos=(new_rect[0],new_rect[1])
if play_button==stop_img:
angle+=1
time=pygame.mixer.music.get_pos()
pytime=int(time)//1000
s=pytime%60
m=pytime//60
info=str(m)+":"+str(s)
print(info)
# 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景
screen.blit(play_button, (270, 330)) # 暂停按钮
screen.blit(new_logo, pos) # 中间logo图
screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲
text=my_font.render(info,True,(0,0,0))
screen.blit(text,(320,200))
# 刷新画面
pygame.display.update()
FPSCLOCK.tick(60)
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