Commit 4c57a144 by BellCodeEditor

save project

parent 4ef3b777
Showing with 9 additions and 2 deletions
......@@ -13,6 +13,7 @@ stop_img = pygame.image.load('stop.png') # 暂停按钮
last_img = pygame.image.load('last.png') # 上一曲按钮
next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮
basic_font=pygame.font.Font('neuropol.ttf',14)
pygame.mixer.music.load("歌曲4.ogg")
volume = 0.2
pygame.mixer.music.set_volume(volume) # 初始播放音量
......@@ -72,7 +73,11 @@ while True:
if pygame.mixer.music.get_busy() == False:
pygame.mixer.music.load("歌曲4.ogg")
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)
newRect=new_logo.get_rect(center=(320,200))
pos=(newRect[0],newRect[1])
......@@ -85,6 +90,7 @@ while True:
screen.blit(new_logo,pos)
screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲
# 刷新画面
scoreSurf=basic_font.render(info,True,(225,225,225))# 刷新画面
screen.blit(scoreSurf,(120,400))
pygame.display.update()
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