Commit 55d3375f by BellCodeEditor

save project

parent 0bd88b21
Showing with 32 additions and 10 deletions
......@@ -56,7 +56,7 @@ while True:
else:
play_button = play_img
pygame.mixer.music.pause()
if x>120 and x<220 and y >350 and y<400:# 上一首
number-=1
if number<0:
......@@ -66,25 +66,45 @@ 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:
number=0
pygame.mixer.music.load(path+"//"+music_list[number])
pygame.mixer.music.play()
play_button = stop_img
pygame.mixer.music.unpause()
click=0
number+=1
if number>len(music_list)-1:
number=0
pygame.mixer.music.load(path+"//"+music_list[number])
pygame.mixer.music.play()
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