Commit e695ea79 by BellCodeEditor

save project

parent 7a2e6a74
Showing with 12 additions and 2 deletions
...@@ -12,12 +12,22 @@ last_img = pygame.image.load('last.png') # 上一曲按钮 ...@@ -12,12 +12,22 @@ 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 logo_img = pygame.image.load('logo.png') # 中间logo
pygame.mixer.music.load('歌曲4.ogg') pygame.mixer.music.load('歌曲4.ogg')
a=0.2 sound=0.2
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type==pygame.QUIT: if event.type==pygame.QUIT:
exit() exit()
if set if event.type==pygame.KEYDOWN:
if event.key==pygame.K_UP:
sound+=0.2
if sound>1:
sound=1
pygame.mixer_music.set_volume(sound)
if event.key==pygame.K_DOWN:
sound-=0.2
if sound<0:
sound=0
pygame.mixer_music.set_volume(sound)
if pygame.mixer.music.get_busy()==False: if pygame.mixer.music.get_busy()==False:
pygame.mixer.music.play() pygame.mixer.music.play()
# 绘制画面 # 绘制画面
......
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