Commit 2fdc8405 by BellCodeEditor

save project

parent b70d0ff9
Showing with 19 additions and 3 deletions
......@@ -13,6 +13,7 @@ last_img = pygame.image.load('last.png') # 上一曲按钮
next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮
pygame.mixer.music.load('2243736345.mp3')
ziti=pygame.font.Font("neuropol.ttf",20)
# 载入音乐
pygame.mixer.music.load('歌曲1.wav') # 载入音乐
music_list=['victory.mp3','2243736345.mp3','1960642808.mp3']
......@@ -80,15 +81,30 @@ while True:
num=0
pygame.mixer.music.load(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)
# text=pygame.front.Font(info,Ture(0,0,0))
new_logo=pygame.transform.rotate(logo_img,angle)
newRect=new_logo.get_rect(center=(320,200))
pos=(newRect[0],newRect[1])
angle+=1
# 绘制画面
pos=(newRect[0],newRect[1])
if play_button==stop_img:
angle+=1
screen.blit(bg_img, (0, 0)) # 填充背景
screen.blit(play_button, (270, 330)) # 暂停按钮
screen.blit(new_logo,pos) # 中间logo图
screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲
text=ziti.render(info,True,(0,0,0))
#screen.blit(text,(100,100))
#score.surf=ziti.render()
screen.blit(text,(300,450))
# 刷新画面
pygame.display.update()
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