Commit 76d0054a by BellCodeEditor

save project

parent 8ac016d0
Showing with 11 additions and 0 deletions
......@@ -12,6 +12,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') # 下一曲按钮
my_font=pygame.font.Font('neuropol.ttf',20)
music_list = []
path = "C:\\Users\\XMBC\\Desktop\\test"
......@@ -85,6 +86,14 @@ while True:
pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play()
play_time=pygame.mixer.music.get_pos()
p=int(play_time/1000)
play_m=p//60
play_n=p%60
info=str(play_m) + ':' + str(play_n)
f=my_font.render(info,True,(0,0,0))
new_logo=pygame.transform.rotate(logo_img,angle)
new=new_logo.get_rect(center=(320,190))
if play_button == stop_img:
......@@ -95,5 +104,6 @@ while True:
screen.blit(new_logo, (new[0],new[1])) # 中间logo图
screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲
screen.blit(f,(110,250))
# 刷新画面
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