Commit a699ed1a by BellCodeEditor

save project

parent 349f0c91
Showing with 33 additions and 1 deletions
......@@ -53,6 +53,10 @@ while True:
else:
play_button = play_img
pygame.mixer.music.pause()
music1 = pygame.mixer.Sound(path + "\\" + music_list)
music_length = music1.get_length()
music_length = int(music_length)
if x > 420 and x < 520 and y > 350 and y < 400:
num += 1
if num > len(music_list) - 1:
......@@ -69,6 +73,11 @@ while True:
num -= 1
if num < 0:
num = len(music_list) - 1
music1 = pygame.mixer.Sound(path + "\\" + music_list)
music_length = music1.get_length()
music_length = int(music_length)
pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play()
play_button = stop_img
......@@ -83,12 +92,34 @@ while True:
num = 0
pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play()
music1 = pygame.mixer.Sound(path + "\\" + music_list)
music_length = music1.get_length()
music_length = int(music_length)
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 = my_font.render(info,tune,(0,0,0))
screen.blit(text,(100,360))
music_m = music_length//60
music_s = music_length%60
if music_s < 10:
music_s = "0"+str(music_s)
info2 = str(music_m)+":"+str(music_s)
text = my_font.render(info,tune,("/" + info2,Tune,(0,0,0))
screen.blit(text,(150,360))
new_logo = pygame.transform.rotate(logo_img, angle)
angle += 1
screen.blit(bg_img, (0, 0))
screen.blit(play_button, (270, 330))
screen.blit(logo_img, (170, 60))
screen.blit(last_img, (120, 350))
screen.blit(next_img, (420, 350))
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