Commit 72781e23 by BellCodeEditor

save project

parent ff2e8f91
Showing with 22 additions and 5 deletions
......@@ -60,6 +60,8 @@ 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 = music1.get_length()
play_button = stop_img
if click % 2 == 0:
click += 2
......@@ -72,6 +74,8 @@ while True:
num = len(music_list) - 1
pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play()
music1 = pygame.mixer.Sound(path + "\\" + music_list[num])
music = music1.get_length()
play_button = stop_img
if click % 2 == 0:
click += 2
......@@ -84,12 +88,23 @@ 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 = music1.get_length()
music = int(music)
music_m = music//60
music_s = music%60
if music_s < 10:
music_s = "0" + str(music_s)
info2 = str(music_m) +":" + str(music_s)
play_time = pygame.mixer.music.get_pos()
play_time = int(play_time/1000)
play_m = play_time//60
play_s = play_time%60
info = str(play_m) +":" + str(play_s)
#text = my_ziti.render(info,True,(50,50,150))
if play_s < 10:
play_s = "0" + str(play_s)
info1 = str(play_m) +":" + str(play_s)
if play_button == play_img:
jiaodu = 0
else:
......@@ -103,9 +118,11 @@ while True:
screen.blit(new_logo, (new_rect)) # 中间logo图
screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲
#scoreSurf = basic_font.render(info,True,(255,255,255))
text = my_ziti.render(info,True,(50,50,150))
screen.blit(text,(60,430))
text1 = my_ziti.render(info1,True,(50,50,150))
text2 = my_ziti.render(info2,True,(150,150,150))
screen.blit(text1,(60,430))
screen.blit(text2,(120,430))
# 刷新画面
pygame.display.update()
FPSCLOCK.tick(60)
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