From 0d0c754ad51bdcd3ff70e9251c98d6ec38c7d3ea Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sat, 5 Nov 2022 20:51:02 +0800 Subject: [PATCH] save project --- my_music.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/my_music.py b/my_music.py index 599e589..fbce744 100644 --- a/my_music.py +++ b/my_music.py @@ -5,7 +5,7 @@ import os pygame.init() screen = pygame.display.set_mode((640, 480)) - +my_fon=pygame.font.Font('neuropol.ttf',18) bg_img = pygame.image.load('background.png') # 背景图 play_img = pygame.image.load('play.png') # 播放按钮 stop_img = pygame.image.load('stop.png') # 暂停按钮 @@ -85,6 +85,13 @@ while True: num = 0 pygame.mixer.music.load(path + "\\" + music_list[num]) pygame.mixer.music.play() + musicpos=pygame.mixer.music.get_pos() + music_m=(musicpos/1000)//60 + music_s=(musicpos/1000)%60 + inf=str (music_m)+":"+str (music_s) + fgf=font.render(inf,True,(255,255,255)) + screen.blit(fgf, (600,360)) + new_logo = pygame.transform.rotate(logo_img, angle) new_rect=new_logo.get_rect(center=(320,200)) pos=(new_rect[0],new_rect[1]) -- libgit2 0.25.0