Commit e340fc00 by BellCodeEditor

save project

parent edf85d26
Showing with 22 additions and 1 deletions
...@@ -59,6 +59,9 @@ while True: ...@@ -59,6 +59,9 @@ while True:
num = 0 num = 0
pygame.mixer.music.load(path + "\\" + music_list[num]) pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play() pygame.mixer.music.play()
music_time=pygame.mixer.Sound(path + "\\" + music_list[num])
music_length = music1.get_length()
music_length = int(music_length)
play_button = stop_img play_button = stop_img
if click % 2 == 0: if click % 2 == 0:
click += 2 click += 2
...@@ -71,6 +74,9 @@ while True: ...@@ -71,6 +74,9 @@ while True:
num = len(music_list) - 1 num = len(music_list) - 1
pygame.mixer.music.load(path + "\\" + music_list[num]) pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play() pygame.mixer.music.play()
music_time=pygame.mixer.Sound(path + "\\" + music_list[num])
music_length = music1.get_length()
music_length = int(music_length)
play_button = stop_img play_button = stop_img
if click % 2 == 0: if click % 2 == 0:
click += 2 click += 2
...@@ -83,10 +89,21 @@ while True: ...@@ -83,10 +89,21 @@ while True:
num = 0 num = 0
pygame.mixer.music.load(path + "\\" + music_list[num]) pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play() pygame.mixer.music.play()
music1_time=pygame.mixer.Sound(path + "\\" + music_list[num])
music_length = music1.get_length()
music_length = int(music_length)
p = pygame.mixer.music.get_pos() p = pygame.mixer.music.get_pos()
p=int(p/1000) p=int(p/1000)
p_m=p//60 p_m=p//60
p_s=p%60 p_s=p%60
if play_s < 10:
play_s = "0"+str(play_s)
info= str(p_m)+":"+str(p_s)
music_m=p//60
music_s=p%60
if music_s < 10:
music_s = "0"+str(music_s)
info= str(p_m)+":"+str(p_s) info= str(p_m)+":"+str(p_s)
new_logo = pygame.transform.rotate(logo_img, angle) new_logo = pygame.transform.rotate(logo_img, angle)
newRet = new_logo.get_rect(center=(320,200)) newRet = new_logo.get_rect(center=(320,200))
...@@ -98,5 +115,8 @@ while True: ...@@ -98,5 +115,8 @@ while True:
screen.blit(logo_img, (170, 60)) screen.blit(logo_img, (170, 60))
screen.blit(last_img, (120, 350)) screen.blit(last_img, (120, 350))
screen.blit(next_img, (420, 350)) screen.blit(next_img, (420, 350))
scoreSur = basic_font.render(info,True,(225,225,225))
screen.blit(scoreSur,(120,440))
scoreSurf2 = basic_font.render("/" + info2,True,(0,0,0))
screen.blit(scoreSurf2,(170,440))
pygame.display.update() 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