Commit 4919748d by BellCodeEditor

save project

parent 15a4fc95
Showing with 12 additions and 1 deletions
...@@ -13,7 +13,7 @@ stop_img = pygame.image.load('stop.png') # 暂停按钮 ...@@ -13,7 +13,7 @@ stop_img = pygame.image.load('stop.png') # 暂停按钮
last_img = pygame.image.load('last.png') # 上一曲按钮 last_img = pygame.image.load('last.png') # 上一曲按钮
next_img = pygame.image.load('next.png') # 下一曲按钮 next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮 logo_img = pygame.image.load('logo.png') # 下一曲按钮
basic_font=pygame.font.Font('neuropol.ttf',14)
path = "C:\\Users\\yangyang\\Desktop\\text" path = "C:\\Users\\yangyang\\Desktop\\text"
filelist = os.listdir(path) filelist = os.listdir(path)
...@@ -89,6 +89,14 @@ while True: ...@@ -89,6 +89,14 @@ while True:
pygame.mixer.music.play() pygame.mixer.music.play()
play_time=pygame.mixer.music.get_pos()
play_time=int(play_time/1000)
play_m=play_time//60
play_s=play_time%60
info =str(play_m)+':'+str(play_s)
new_logo=pygame.transform.rotate(logo_img,angle) new_logo=pygame.transform.rotate(logo_img,angle)
newRect=new_logo.get_rect(center=(320,200)) newRect=new_logo.get_rect(center=(320,200))
...@@ -104,5 +112,7 @@ while True: ...@@ -104,5 +112,7 @@ while True:
screen.blit(last_img, (120, 350)) # 上一曲 screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲 screen.blit(next_img, (420, 350)) # 下一曲
# 刷新画面 # 刷新画面
scoreSurf=basic_font.render(info,Ture,(255,255,255))
screen.blit(scoreSurf,(120,440))
pygame.display.update() pygame.display.update()
FPS.tick(10000000000000000000000000000000000000000000000000000000000000) FPS.tick(10000000000000000000000000000000000000000000000000000000000000)
\ 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