Commit d7d47b9e by BellCodeEditor

save project

parent 5f5b5c1e
Showing with 17 additions and 1 deletions
......@@ -12,7 +12,6 @@ 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') # 下一曲按钮
music_list = []
path = "C:\\Users\\Administrator\\Desktop"
filelist = os.listdir(path)
......@@ -80,6 +79,19 @@ while True:
num += 1
if num > len(music_list)-1:
num = 0
pygame.mixer.music.load(path+"\\"+music_list[num])
pygame.mixer.music.play()
music1=pygame.mixer.Soud(path+"\\"+music_list[num])
music_length=music1.get_lengt()
music_length=int(play_m)
music_m=music_length//60
music_s=music_length%60
if music_s<10:
music_s="0"+str(music_s)
info2=str(music_m)+":"+str(music_s)
#旋转唱片图标
new_logo=pygame.transform.rotate(logo_img,jiaodu)
newRect=new_logo.get_rect(center=(200,90))
......@@ -92,5 +104,8 @@ while True:
screen.blit(logo_img, (170, 60)) # 中间logo图
screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲
#绘制时间长度
scoreSurf=basic_font.render(info,True)
# 刷新画面
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