Commit 0e6f44a7 by BellCodeEditor

save project

parent 65e5d4a2
Showing with 3 additions and 5 deletions
...@@ -15,7 +15,7 @@ logo_img = pygame.image.load('logo.png') # 中间logo图 ...@@ -15,7 +15,7 @@ logo_img = pygame.image.load('logo.png') # 中间logo图
basic_font = pygame.font.Font('neuropol.ttf', 14) # 字体 basic_font = pygame.font.Font('neuropol.ttf', 14) # 字体
music_list = [] music_list = []
path = "C:\\Users\\bellcode\\Desktop\\test" path = "C:\\Users\\mk\\Documents\\pygame_lesson6_diy4"
filelist = os.listdir(path) filelist = os.listdir(path)
for i in filelist: for i in filelist:
if i[-4:] == ".ogg" or i[-4:] == ".wav": if i[-4:] == ".ogg" or i[-4:] == ".wav":
......
...@@ -13,10 +13,9 @@ stop_img = pygame.image.load('stop.png') # 暂停按钮 ...@@ -13,10 +13,9 @@ stop_img = pygame.image.load('stop.png') # 暂停按钮
last_img = pygame.image.load('last.png') # 上一曲按钮 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') # 下一曲按钮
basic_font=pygame.font.Font("neuropol.ttf",14)
music_list = [] music_list = []
path = "C:\\Users\\mk\\Documents\\pygame_lesson6_diy1" path = "C:\\Users\\mk\\Documents\\pygame_lesson6_diy4"
filelist = os.listdir(path) filelist = os.listdir(path)
num = -1 num = -1
for i in filelist: for i in filelist:
...@@ -78,7 +77,6 @@ while True: ...@@ -78,7 +77,6 @@ while True:
click += 2 click += 2
else: else:
click += 1 click += 1
if pygame.mixer.music.get_busy() == False: if pygame.mixer.music.get_busy() == False:
num += 1 num += 1
...@@ -87,7 +85,7 @@ while True: ...@@ -87,7 +85,7 @@ while True:
pygame.mixer.music.load(path + "\\" + music_list[num]) pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play() pygame.mixer.music.play()
new_logo = pygame.transform.rotate(logo_img, angle) new_logo = pygame.transform.rotate(logo_img, angle)
nemRect=new_logo.get_rect(center=(320,200)) newRect=new_logo.get_rect(center=(320,200))
pos=(newRect[0],newRect[1]) pos=(newRect[0],newRect[1])
if play_button==stop_img: 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