Commit e9a9630e by BellCodeEditor

save project

parent 4fb0ef3a
Showing with 18 additions and 3 deletions
......@@ -18,15 +18,18 @@ pygame.mixer._img music.laod('歌曲4.oog')
while True:
for event in pygame.event.get():
if event.type==locals.QUIT:
if event.type==locals.MOUSEBUTTONDOWN:
exit()
if event.type==locals.KEYDOWN:
if event.key==locals.K_w:
volume+=0.1
if volume >1:
volume =1
if volume >0:
volume =0
pygame.mixer.music.set_volume(volume)
if event.key==locals.K_s:
volume-=0.1
if volume<0:
volume=0
......@@ -40,3 +43,15 @@ if event.type==locals.KEYDOWN:
screen.blit(next_img, (420, 350)) # 下一曲
# 刷新画面
pygame.display.update()
bg_img=pygame.image.load('background.png')
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')
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