Commit 92bba25d by BellCodeEditor

save project

parent 349ecdec
Showing with 6 additions and 5 deletions
...@@ -12,20 +12,21 @@ last_img = pygame.image.load('last.png') # 上一曲按钮 ...@@ -12,20 +12,21 @@ last_img = pygame.image.load('last.png') # 上一曲按钮
next_img = pygame.image.load('next.png') # 下一曲按钮 next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮 logo_img = pygame.image.load('logo.png') # 下一曲按钮
pygame.mixer.music.set_vloume(vloume)
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type==locals.QUIT if event.type==locals.QUIT:
exit() exit()
if event.type==locals.KEYDOWN: if event.type==locals.KEYDOWN:
if event.key==locals.k_up: if event.key==locals.K_UP:
vloume+=0.1 vloume+=0.1
if vloume>1: if vloume>1:
vloume=1 vloume=1
if event.key==locals.k_up: pygame.mixer.music.set_vloume(vloume)
if event.key==locals.K_DOWN:
vloume-=0.1 vloume-=0.1
if vloume<0: if vloume<0:
vloume=0 vloume=0
pygame.mixer.music.set_vloume(vloume)
if pygame.mixer.music.get_busy==False: if pygame.mixer.music.get_busy==False:
pygame.mixer.music.play() pygame.mixer.music.play()
...@@ -36,4 +37,4 @@ while True: ...@@ -36,4 +37,4 @@ while True:
screen.blit(last_img, (120, 350)) # 上一曲 screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲 screen.blit(next_img, (420, 350)) # 下一曲
# 刷新画面 # 刷新画面
?? pygame.display.update
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