Commit 44fe4904 by BellCodeEditor

save project

parent ae4aa574
Showing with 10 additions and 2 deletions
......@@ -15,7 +15,7 @@ logo_img = pygame.image.load('logo.png') # 下一曲按钮
basiic_font = pygame.font.Font('neuropol.ttf',14)
music_list = []
path = "C:\\Users\\Administrator\\Desktop\\text"
path = r"C:\Users\Administrator\Desktop\text"
filelist = os.listdir(path)
num = -1
for i in filelist:
......@@ -99,13 +99,20 @@ while True:
play_time = int(play_time/1000)
play_m = play_time//60
play_s = play_time%60
if play_m < 10:
play_m = '0'+str(play_m)
if play_s < 10:
play_s = '0'+str(play_s)
info = str(play_m) + ':' + str(play_s)
music_m = music_length//60
music_s = music_length%60
if music_m < 10:
music_m = '0'+str(music_m)
if music_s < 10:
music_s = '0'+str(music_s)
info2 = str(music_m) + ':' + str(music_s)
......@@ -124,7 +131,7 @@ while True:
screen.blit(next_img, (420, 350)) # 下一曲
scoreSurf = basiic_font.render(info,True,(225,225,225))
screen.blit(scoreSurf, (120, 440))
scoreSurf2 = basiic_font.render('/' + info,True,(225,225,225))
scoreSurf2 = basiic_font.render(' /' + info2,True,(225,225,225))
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