Commit 193f31d1 by BellCodeEditor

save project

parent 130b0862
Showing with 6 additions and 1 deletions
...@@ -14,7 +14,8 @@ next_img = pygame.image.load('next.png') # 下一曲按钮 ...@@ -14,7 +14,8 @@ next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮 logo_img = pygame.image.load('logo.png') # 下一曲按钮
music_list = [] music_list = []
path = "C:\\Users\\bellcode\\Desktop\\test" angle=0
path = "C:\\Users\\Administrator\\Desktop\\test\\music"
filelist = os.listdir(path) filelist = os.listdir(path)
num = -1 num = -1
for i in filelist: for i in filelist:
...@@ -26,6 +27,7 @@ click = 0 ...@@ -26,6 +27,7 @@ click = 0
play_button = stop_img play_button = stop_img
while True: while True:
print(angle)
for event in pygame.event.get(): for event in pygame.event.get():
if event.type == locals.QUIT: if event.type == locals.QUIT:
exit() exit()
...@@ -50,8 +52,11 @@ while True: ...@@ -50,8 +52,11 @@ while True:
if click % 2 == 0: if click % 2 == 0:
play_button = stop_img play_button = stop_img
pygame.mixer.music.unpause() pygame.mixer.music.unpause()
new_logo = pygame.transform.rotate(logo_img,angle)
angle += 1
else: else:
play_button = play_img play_button = play_img
angle=0
pygame.mixer.music.pause() pygame.mixer.music.pause()
if x > 420 and x < 520 and y > 350 and y < 400: # 下一曲 if x > 420 and x < 520 and y > 350 and y < 400: # 下一曲
num += 1 num += 1
......
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