Commit 55d3375f by BellCodeEditor

save project

parent 0bd88b21
Showing with 23 additions and 1 deletions
......@@ -66,6 +66,9 @@ while True:
play_button = stop_img
pygame.mixer.music.unpause()
click=0
music1=pygame.mixer.Sound(path+"//"+music_list[number])
length=int(music1.get_length())
if x>420 and x<520 and y >350 and y<400:# 下一首
number+=1
if number>len(music_list)-1:
......@@ -75,16 +78,33 @@ while True:
play_button = stop_img
pygame.mixer.music.unpause()
click=0
music1=pygame.mixer.Sound(path+"//"+music_list[number])
length=int(music1.get_length())
if pygame.mixer.music.get_busy() == False:# 循环播放
if number>len(music_list)-1:
number=0
pygame.mixer.music.load(music_list[number])
pygame.mixer.music.play()# 绘制画面
music1=pygame.mixer.Sound(path+"//"+music_list[number])
length=int(music1.get_length())
play_time=pygame.mixer.music.get_pos()
play_time=int(play_time/1000)
play_minute=play_time//60
play_second=play_time%60
sofo=str(play_minute)+":"+str(play_second)
time_minute=length//60
time_second=length%60
if time_minute<10:
sofo2="/"+" "+"0"+str(time_minute)+":"+str(time_second)
if time_second<10:
sofo2="/"+" "+"0"+str(time_minute)+":"+"0"+str(time_second)
if play_minute<10:
sofo="0"+str(play_minute)+":"+str(play_second)
if play_second<10:
sofo="0"+str(play_minute)+":"+"0"+str(play_second)
logodown_img = pygame.transform.rotate(logo_img,xuanzhuan) # 页面
if play_button == stop_img:
xuanzhuan+=1
......@@ -97,5 +117,7 @@ while True:
screen.blit(next_img, (420, 350)) # 下一曲
screen.blit(logodown_img, (pos)) # 中间logo图
t=sss.render(sofo,True,(0,0,0))
tt=sss.render(sofo2,True,(0,0,0))
screen.blit(t,(120,440))
screen.blit(tt,(210,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