Commit d6d81200 by BellCodeEditor

save project

parent 6ca25776
Showing with 22 additions and 2 deletions
......@@ -30,6 +30,8 @@ while True:
play_time=int(play_time//1000)
play_m=play_time//60
play_s=play_time%60
if play_s<10:
play_s='0'+str(play_s)
playtime=str(play_m)+':'+str(play_s)
myt=pygame.font.Font('neuropol.ttf',20)
text=myt.render(playtime,True,(0,0,0))
......@@ -73,6 +75,9 @@ while True:
num = 0
pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play()
musicx=pygame.mixer.Sound(path + "\\" + music_list[num])
music_len=musicx.get_length()
music_len=int(music_len)
play_button = stop_img
if click % 2 == 0:
click += 2
......@@ -85,6 +90,10 @@ while True:
num = len(music_list) - 1
pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play()
musicx=pygame.mixer.Sound(path + "\\" + music_list[num])
music_len=musicx.get_length()
music_len=int(music_len)
play_button = stop_img
if click % 2 == 0:
click += 2
......@@ -97,18 +106,28 @@ while True:
num = 0
pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play()
musicx=pygame.mixer.Sound(path + "\\" + music_list[num])
music_len=musicx.get_length()
music_len=int(music_len)
new_logo=pygame.transform.rotate(logo_img,angle)
newRect=new_logo.get_rect(center=(320,200))
pos = (newRect[0],newRect[1])
if click%2==0:
angle+=1
music_len_m=music_len//60
music_len_s=music_len%60
zongtime='/'+str(music_len_m)+':'+str(music_len_s)
myt1=pygame.font.Font('neuropol.ttf',20)
text1=myt1.render(zongtime,True,(0,0,0))
# 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景
screen.blit(play_button, (270, 330)) # 暂停按钮
screen.blit(new_logo,pos) # 中间logo图
screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350))
screen.blit(text,(150,420)) # 下一曲
screen.blit(next_img, (420, 350)) # 下一曲
screen.blit(text,(150,420))
screen.blit(text1,(240,420))
# 刷新画面
pygame.display.update()
\ No newline at end of file
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