Commit bcaf527b by BellCodeEditor

auto save

parent 99890816
Showing with 27 additions and 2 deletions
......@@ -11,10 +11,34 @@ 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') # 中间logo
pygame.mixer.music.load('test.wav')
q=0.2
w=0
e=stop_img
pygame.mixer.music.set_q(q)
while True:
for event in pygame.event.get():
if event.display=
if event.type == locals.QUIT:
exit()
if event.key==locals.K_UP:
q+=0.1
if q<1:
q=1
pygame.mixer.music.set_q
if event.key==locals.K_DOWN:
q-=0.1
if q<0:
q=0.1
pygame.mixer.music.set_q(q)
if event.type == locals.MOUSEBUTTONDOWN:
W+=1
if w%2==0:
play_button=stop_img
pygame.mixer.music.unpause()
else:
pygame.mixer.music.pause()
if pygame.mixer.music.get_busy()==False:
pygame.mixer.music.play
# 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景
......@@ -24,3 +48,4 @@ while True:
screen.blit(next_img, (420, 350)) # 下一曲
# 刷新画面
pygame.display.update()
p=play_img
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