Commit 8f4009c7 by BellCodeEditor

save project

parent 50b2c428
Showing with 29 additions and 4 deletions
......@@ -20,12 +20,14 @@ num = -1
for i in filelist:
if i[-4:] == ".wav" or i[-4:] == ".ogg":
music_list.append(i)
num = -
num = -1
angle = 0
volume = 0.2
pygame.mixer.music.set_volume(volume)
click = 0
play_button = stop_img
angle = 0
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
......@@ -82,10 +84,33 @@ while True:
num += 1
if num > len(music_list)-1:
num = 0
pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.load(path + music_list[num])
pygame.mixer.music.play()
play_timg = pygame.mixer.music.get_pos()
play_timg = int(play_timg/1000)
play_m = play_timg//60
play_s = play_timg % 60
if play_s < 10:
play_s = "0"+str(play_s)
info = str(play_m) + ":" + str(play_s)
music_m = music_length//60
music_s = music_length % 60
if music_s < 10:
music_s = "0"+str(music_s)
info = str(music_m) + ":" + str(music_s)
new_logo = pygame.transform.rotate(logo_img, angle)
angle += 1
newRect = new_logo.get_rect(center=(320,200))
pos = (newRect[0],newRect[1])
if play_button == stop_img
angle += 1
screen.blit(bg_img, (0, 0))
screen.blit(play_button, (270, 330))
screen.blit(logo_img, (170, 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