Commit 4fe52564 by BellCodeEditor

save project

parent 4778322e
Showing with 8 additions and 3 deletions
......@@ -10,13 +10,15 @@ play_img = pygame.image.load('play.png') # 播放按钮
stop_img = pygame.image.load('stop.png') # 暂停按钮
last_img = pygame.image.load('last.png') # 上一曲按钮
next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img=pygame.image.load('logo.png')
num=-1
m = []
path="C:\\Users\\zhang\\Desktop\\test"
f=os.listdir(path)
for i in f:
if i[-4:]==".ogg" or i[-4:]==".wav":
m.append(i)
m.append(i)
angle=0
v=0.5
pygame.mixer.music.set_volume(v) # 初始播放音量
click=0
......@@ -70,11 +72,14 @@ while True:
print(num)
pygame.mixer.music.load(path + "\\"+m[num])
pygame.mixer.music.play()
new_logo = pygame.transform.rotate(logo_img, angle)
new_logo = pygame.transform.rotate(logo_img, angle)
newRect=new_logo.get_rect(center=(320, 200))
pos = (newRect[0], newRect[1])
angle += 1
# 绘制画面
screen.blit(bg_img, (0,0)) # 填充背景
screen.blit(play_b, (270,350))
screen.blit(new_logo,pos)
screen.blit(last_img, (120, 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