Commit 9eb535e0 by BellCodeEditor

save project

parent 46e94d25
Showing with 14 additions and 1 deletions
......@@ -86,7 +86,14 @@ while True:
num = 0
pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play()
#获取歌曲总长
#获取歌曲时间
play_time = pygame.mixer.music.get_pos()
time = int(play_time/1000)
play_m = time // 60
play_s = time % 60
mt = (str(play_m) +':'+str(play_s))
#唱片旋转
new_logo = pygame.transform.rotate(logo_img, angle)
new_rect = new_logo.get_rect(center=(320,200))
pop = (new_rect[0],new_rect[1])
......@@ -94,6 +101,12 @@ while True:
angle -= 1
# 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景
#设置时间、字体
my_font = pygame.font.Font('neuropol.ttf',18)
font = my_font.render(mt,True,(0,0,0))
screen.blit(font,(0,0))
screen.blit(play_button, (270, 330)) # 暂停按钮
screen.blit(new_logo, (pop)) # 中间logo图
screen.blit(last_img, (120, 350)) # 上一曲
......
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