Commit 1a09fed2 by BellCodeEditor

save project

parent 730b836d
Showing with 19 additions and 0 deletions
......@@ -67,6 +67,11 @@ while True:
pygame.mixer.music.play()
click=0
play_button = stop_img
music1=pygame.mixer.Sound(path+'\\'+music_list[num])
music_length=music1.get_length()
music_length=int(music_length)
if x>420 and y>350 and x<520 and y<400:
num+=1
if num>len(music_list)-1:
......@@ -76,6 +81,10 @@ while True:
click=0
play_button = stop_img
music1=pygame.mixer.Sound(path+'\\'+music_list[num])
music_length=music1.get_length()
music_length=int(music_length)
if pygame.mixer.music.get_busy() == False:
num+=1
if num>len(music_list):
......@@ -83,6 +92,10 @@ while True:
pygame.mixer.music.load(path+'\\'+music_list[num])
pygame.mixer.music.play()
music1=pygame.mixer.Sound(path+'\\'+music_list[num])
music_length=music1.get_length()
music_length=int(music_length)
play_time=pygame.mixer.music.get_pos()
play_time=int(play_time/1000)
play_m=play_time//60
......@@ -90,6 +103,11 @@ while True:
info=str(play_m)+':'+str(play_s)
test=my_font.render(info,True,(255,255,255))
muisc_m=music_length//60
muisc_s=music_length%60
info1='/'+str(muisc_m)+':'+str(muisc_s)
test1=my_font.render(info1,True,(0,0,0))
new_logo=pygame.transform.rotate(logo_img,angle)
z=new_logo.get_rect(center=(320,200))
pos=(z[0],z[1])
......@@ -103,5 +121,6 @@ while True:
screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲
screen.blit(test,(120, 440))
screen.blit(test1,(160,440))
# 刷新画面
pygame.display.update()
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