Commit c9ea4003 by BellCodeEditor

save project

parent 6720eb99
Showing with 9 additions and 1 deletions
...@@ -28,6 +28,7 @@ a=0 ...@@ -28,6 +28,7 @@ a=0
x1,y1=0,0 x1,y1=0,0
yyds=pygame.transform.rotate(logo_img,a) yyds=pygame.transform.rotate(logo_img,a)
my_fout=pygame.font.Font('neuropol.ttf',18) my_fout=pygame.font.Font('neuropol.ttf',18)
e0=pygame.mixer.Sound(music_list[num])
while True: while True:
...@@ -63,6 +64,7 @@ while True: ...@@ -63,6 +64,7 @@ while True:
if num > len(music_list) - 1: if num > len(music_list) - 1:
num = 0 num = 0
pygame.mixer.music.load(path + "\\" + music_list[num]) pygame.mixer.music.load(path + "\\" + music_list[num])
e0=pygame.mixer.Sound(music_list[num])
pygame.mixer.music.play() pygame.mixer.music.play()
play_button = stop_img play_button = stop_img
if click % 2 == 0: if click % 2 == 0:
...@@ -75,17 +77,22 @@ while True: ...@@ -75,17 +77,22 @@ while True:
if num < 0: if num < 0:
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])
e0=pygame.mixer.Sound(music_list[num])
pygame.mixer.music.play() pygame.mixer.music.play()
play_button = stop_img play_button = stop_img
if click % 2 == 0: if click % 2 == 0:
click += 2 click += 2
else: else:
click += 1 click += 1
e=e0.get_length()
sb0=pygame.mixer.music.get_pos() sb0=pygame.mixer.music.get_pos()
sb=sb0//1000 sb=sb0//1000
p_m=sb//60 p_m=sb//60
p_s=sb%60 p_s=sb%60
info=str(p_m)+':'+str(p_s) e_m=int(e//60)
e_s=int(e%60)
info=str(p_m)+':'+str(p_s)+'/'+str(e_m)+':'+str(e_s)
text=my_fout.render(info,True,(0,0,0)) text=my_fout.render(info,True,(0,0,0))
if pygame.mixer.music.get_busy() == False: if pygame.mixer.music.get_busy() == False:
...@@ -93,6 +100,7 @@ while True: ...@@ -93,6 +100,7 @@ while True:
if num > len(music_list)-1: if num > len(music_list)-1:
num = 0 num = 0
pygame.mixer.music.load(path + "\\" + music_list[num]) pygame.mixer.music.load(path + "\\" + music_list[num])
e0=pygame.mixer.Sound(music_list[num])
pygame.mixer.music.play() pygame.mixer.music.play()
if click%2==0: if click%2==0:
a+=0.5 a+=0.5
......
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