Commit 05650597 by BellCodeEditor

save project

parent 10cb7d63
Showing with 5 additions and 2 deletions
......@@ -14,12 +14,11 @@ next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮
my_font=pygame.font.Font("neuropol.ttf",18)
sound_length=0
sound_render=0
music_list = []
path = "C:\\Users\\Administrator\\Desktop\\test"
filelist = os.listdir(path)
num = -1
fpsclock=0
fpsclock=pygame.time.Clock()
for i in filelist:
if i[-4:] == ".wav" or i[-4:] == ".ogg":
music_list.append(i)
......@@ -90,6 +89,9 @@ while True:
num = 0
pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play()
sound1=pygame.mixer.Sound(path+"\\"+music_list[num])
sound_length=sound1.get_length()
sound_length=int(sound_length)
new_logo = pygame.transform.rotate(logo_img, angle)
new_logo=pygame.transform.rotate(logo_img,angle)
new_rect=new_logo.get_rect(center=(320,200))
......@@ -107,6 +109,7 @@ while True:
if sound_s<10:
sound_s="0"+str(sound_s)
new_render=str(music_m)+":"+str(music_s)
sound_render=str(music_m)+":"+str(music_s)
text=my_font.render(new_render,True,(255,255,255))
text2=my_font.render(sound_render,True,(255,0,0))
......
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