Commit 86203d65 by BellCodeEditor

save project

parent f314aac7
Showing with 12 additions and 1 deletions
...@@ -28,6 +28,7 @@ click = 0 ...@@ -28,6 +28,7 @@ click = 0
play_button = stop_img play_button = stop_img
angle=0 angle=0
FPSCLOCK=pygame.time.Clock() FPSCLOCK=pygame.time.Clock()
my_font=pygame.font.Font("neuropol.ttf",20)
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
...@@ -88,7 +89,15 @@ while True: ...@@ -88,7 +89,15 @@ while True:
new_logo=pygame.transform.rotate(logo_img,angle) new_logo=pygame.transform.rotate(logo_img,angle)
new_rect=new_logo.get_rect(center=(320,200)) new_rect=new_logo.get_rect(center=(320,200))
pos=(new_rect[0],new_rect[1]) pos=(new_rect[0],new_rect[1])
angle+=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(bg_img, (0, 0)) # 填充背景
...@@ -96,6 +105,8 @@ while True: ...@@ -96,6 +105,8 @@ while True:
screen.blit(new_logo, 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)) # 下一曲
text=my_font.render(info,True,(0,0,0))
screen.blit(text,(320,200))
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
FPSCLOCK.tick(60) 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