Commit 6603cb30 by BellCodeEditor

save project

parent b0de554a
Showing with 9 additions and 4 deletions
......@@ -13,9 +13,9 @@ 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') # 下一曲按钮
kd=pygame.font.Font('neuropl.ttf',14)#字体
kd=pygame.font.Font('neuropol.ttf',14)#字体
path = "C:\\Users\\xingxing\\Desktop\\py"
path = "C:\\Users\\玛酷\\Desktop\\text"
filelist = os.listdir(path)
music_list = []
for i in filelist:
......@@ -85,7 +85,7 @@ while True:
pygame.mixer.music.load(path+"\\"+music_list[num])
pygame.mixer.music.play() #播放音乐·
#歌曲时间
music1 = pygame.mixer.sound(path + "\\" + music_list[num])
music1 = pygame.mixer.Sound(path + "\\" + music_list[num])
music_length = music1.get_length()
music_length = int(music_length)
#进度时间
......@@ -96,7 +96,7 @@ while True:
play_m=play_time//60#分
play_s=play_time%60#秒
if play_s = <10:
if play_s <10:
play_s = "0"+str(play_s)
info=str(play_m)+":"+str(play_s)
# +++++++++++++++++++++++++++++++++++++
......@@ -116,5 +116,9 @@ while True:
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,140))
scoreSurf2 = basic_font.render("/" + info2,(0,0,0))
screen.blit(scoreSurf2,(170,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