Commit aa57203f by BellCodeEditor

save project

parent b26da1f2
Showing with 8 additions and 2 deletions
...@@ -13,6 +13,7 @@ next_img = pygame.image.load('next.png') # 下一曲按钮 ...@@ -13,6 +13,7 @@ next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮 logo_img = pygame.image.load('logo.png') # 下一曲按钮
n=-1 n=-1
ml=[] ml=[]
angle=0
p="C:\\Users\\6\\Desktop\\test" p="C:\\Users\\6\\Desktop\\test"
f=os.listdir(p) f=os.listdir(p)
# 载入音乐 # 载入音乐
...@@ -66,17 +67,22 @@ while True: ...@@ -66,17 +67,22 @@ while True:
n=0 n=0
pygame.mixer.music.load(p+"\\"+ml[n]) pygame.mixer.music.load(p+"\\"+ml[n])
pygame.mixer.music.play() pygame.mixer.music.play()
if pygame.mixer.music.get_busy() == False: if pygame.mixer.music.get_busy() == False:
n+=1 n+=1
if n>len(f)-1: if n>len(f)-1:
n=0 n=0
pygame.mixer.music.load(p+"\\"+ml[n]) pygame.mixer.music.load(p+"\\"+ml[n])
pygame.mixer.music.play() pygame.mixer.music.play()
nl =pygame
nl=pygame.transform.rotate(logo_img,angle)
nr=nl.get_rect_(ce=(320,200))
po=(nr[0],nr[1])
angle+=1
# 绘制画面 # 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景 screen.blit(bg_img, (0, 0)) # 填充背景
screen.blit(play_button, (270, 330)) # 暂停按钮 screen.blit(play_button, (270, 330)) # 暂停按钮
screen.blit(logo_img, (170, 60)) # 中间logo图 screen.blit(logo_img, (nl, po)) # 中间logo图
screen.blit(last_img, (120, 350)) # 上一曲 screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲 screen.blit(next_img, (420, 350)) # 下一曲
# 刷新画面 # 刷新画面
......
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