Commit f0b905f2 by BellCodeEditor

save project

parent d2c82579
Showing with 11 additions and 1 deletions
......@@ -13,7 +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') # 中间logo
basic_font =pygame.font.Font('neuropol.ttf',14)
#歌曲列表
music_list=[]
path = 'C:\\Users\\bell\\Desktop\\test'
......@@ -88,6 +88,13 @@ while True:
pygame.mixer.music.load(path+'\\'+music_list[num])# 载入音乐 
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_rect=new_logo.get_rect(center=(320,200))
pos=(new_rect[0],new_rect[1])
......@@ -101,5 +108,7 @@ while True:
screen.blit(new_logo,pos) # 中间logo图
screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲
scoreSurf = basic_font.render(info,True,(255,255,255))#字体
screen.blit(scoreSurf,(120,440))#渲染歌曲进度
# 刷新画面
pygame.display.update()
\ 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