Commit 1bd76910 by BellCodeEditor

save project

parent d59c888a
Showing with 12 additions and 1 deletions
......@@ -30,6 +30,9 @@ while True:
num=0
pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play() #播放音乐
music1 = pygame.mixer.Sound(path + "\\" + music_list[num])
music_len = music1.get_length()
music_len = int(music_len)
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
......@@ -77,8 +80,14 @@ while True:
play_time = int(play_time / 1000)
play_m = play_time // 60
play_s = play_time % 60
if play_s < 10:
play_s = "0" + str(play_s)
info = str(play_m) + ":" + str(play_s)
text = font.render(info,True,(0,0,0))
text = font.render(info,True,(255,255,255))
music_m = music_len // 60
music_s = music_len % 60
info2 = str(music_m) + ":" + str(music_s)
text2 = font.render("/" + info2,True,(0,0,0))
# 绘制画面
new_logo = pygame.transform.rotate(logo_img,angle)
newRect = new_logo.get_rect(center = (320,200))
......@@ -92,6 +101,7 @@ while True:
screen.blit(new_logo,pos)
screen.blit(last_img, (120, 350))
screen.blit(text,(120,440))
screen.blit(text2,(180,440))
screen.blit(next_img, (420, 350))
# 刷新画面
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