Commit 06a6b341 by BellCodeEditor

save project

parent 2bcf6385
Showing with 10 additions and 0 deletions
......@@ -14,6 +14,8 @@ last_img = pygame.image.load('last.png') # 上一曲按钮
next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮
my_font =pygame.font.Font('neuropol.ttf',20)
path = "C:\\Users\\Administrator\\Desktop\\test\\music\\"
filelist = os.listdir(path)
music_list = []
......@@ -29,6 +31,14 @@ click = 0
play_button = stop_img
while True:
play_time = pygame.mixer.music.get_pos()
play_time /= 1000
play_time = int(play_time)
play_time_min = play_time//60
play_time_second = play_time%60
play_time_min_second = str(play_time_min)+':'+str(play_time_second)
text = my_font.render(play_time_min_second,True,(0,0,0))
screen.blit(text,(20,460))
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
......
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