Commit 010ad512 by BellCodeEditor

save project

parent 6e8607f7
Showing with 3 additions and 2 deletions
...@@ -14,7 +14,7 @@ last_img = pygame.image.load('last.png') # 上一曲按钮 ...@@ -14,7 +14,7 @@ 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') # 下一曲按钮
path = "C:\\Users\\bellcode\\Desktop\\test" path = "C:\\Users\\6\\Desktop\\test"
filelist = os.listdir(path) filelist = os.listdir(path)
music_list = [] music_list = []
for i in filelist: for i in filelist:
...@@ -81,7 +81,7 @@ while True: ...@@ -81,7 +81,7 @@ while True:
num += 1 num += 1
if num > len(music_list)-1: if num > len(music_list)-1:
num = 0 num = 0
pygame.mixer.music.load(path+music_list[num]) pygame.mixer.music.load(path+'\\'+music_list[num])
pygame.mixer.music.play() pygame.mixer.music.play()
# +++++++++++++++++++++++++++++++++++++ # +++++++++++++++++++++++++++++++++++++
# 旋转图片(注意:这里要搞一个新变量,存储旋转后的图片) # 旋转图片(注意:这里要搞一个新变量,存储旋转后的图片)
...@@ -90,6 +90,7 @@ while True: ...@@ -90,6 +90,7 @@ while True:
newRect = new_logo.get_rect(center=(320, 200)) newRect = new_logo.get_rect(center=(320, 200))
# print(newRect) # rect(170, 65, 300, 270) 左上角坐标、图片大小 # print(newRect) # rect(170, 65, 300, 270) 左上角坐标、图片大小
pos = (newRect[0], newRect[1]) pos = (newRect[0], newRect[1])
if play_button==stop_img:
angle += 1 angle += 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