Commit e4c5f188 by BellCodeEditor

save project

parent ee8768b2
Showing with 17 additions and 0 deletions
...@@ -73,11 +73,22 @@ while True: ...@@ -73,11 +73,22 @@ while True:
if num > len(music_list)-1: if num > len(music_list)-1:
num=m num=m
pygame.mixer.music.load(music_list) pygame.mixer.music.load(music_list)
music_time=playgame.mixer.Sound()
play_m=play_time//60
play_m=play_time%60
if play_s < 10:
play_s = "0"+str(play_s)
music_time_length=music.get
music_time_length=int()
p = playgame.mixer.music.get_pos() p = playgame.mixer.music.get_pos()
p=int(p/1000) p=int(p/1000)
p_m=p//60 p_m=p//60
p_s=p%60 p_s=p%60
if play_s < 10:
play_s = "0"+str(play_s)
info = str(p_m)+":"+str(p_s) info = str(p_m)+":"+str(p_s)
play_m=play_time//60
play_m=play_time%60
pygame.mixer.mus pygame.mixer.mus
new_logo = playgame.transform.rotate(logo_img,angle) new_logo = playgame.transform.rotate(logo_img,angle)
nuwrect = nuw_logo,get_rect(center=(320,200)) nuwrect = nuw_logo,get_rect(center=(320,200))
...@@ -89,6 +100,12 @@ while True: ...@@ -89,6 +100,12 @@ while True:
screen.blit(play_button, (270, 330)) # 暂停按钮 screen.blit(play_button, (270, 330)) # 暂停按钮
screen.blit(logo_img, (170, 60)) # 中间logo图 screen.blit(logo_img, (170, 60)) # 中间logo图
screen.blit(last_img, (120, 350)) # 上一曲 screen.blit(last_img, (120, 350)) # 上一曲
ygame.mixer.music.load(path+"\\"+music_list[num])
screen.blit(next_img, (420, 350)) # 下一曲 screen.blit(next_img, (420, 350)) # 下一曲
ygame.mixer.music.load(path+"\\"+music_list[num])
scoreSurf=basic_font.render(info,True,(255,255,255))
screen.blit(scoreSurf,(120,440))
scoreSurf2=basic_font.render("/"+info2,True,(0,0,0))
screen.blit(scoreSurf2,(170,440))
# 刷新画面 # 刷新画面
pygame.display.update() 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