Commit d2fdaf33 by BellCodeEditor

save project

parent bc7ca776
Showing with 6 additions and 5 deletions
......@@ -11,8 +11,8 @@ 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('歌曲四.omg')
filelist['歌曲一.omg','歌曲二.omg','歌曲三.omg','歌曲四.omg']
num = -1
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
......@@ -42,9 +42,6 @@ while True:
x,y = event.pos
if x > 270 and x < 370 and y > 350 and y < 450:
click += 1
if click%2 == 0:
pygame.mixer.music.unpause()
start = stop_img
......@@ -55,6 +52,10 @@ while True:
if volume <=0:
volume = 0
if pygame.mixer.music.get_busy() == False:
num += 1
if num > len(filelist)-1:
num = 0
pygame.mixer.music.load(filelist[num])
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