Commit fdcf1925 by BellCodeEditor

auto save

parent 2702e530
Showing with 4 additions and 2 deletions
......@@ -5,6 +5,7 @@ import os
pygame.init()
screen = pygame.display.set_mode((640, 480))
FPS = pygame.time.Clock()
bg_img = pygame.image.load('background.png') # 背景图
play_img = pygame.image.load('play.png') # 播放按钮
......@@ -13,13 +14,14 @@ last_img = pygame.image.load('last.png') # 上一曲按钮
next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮
music_list = []
path = "C:\\Users\\Administrator\\Desktop\\tast"
filelist = os.listdir(path)
music_list = []
num = -1
for i in filelist:
if i[-4:] == ".wav" or i[-4:] == ".ogg":
if i[-4:] == ".ogg" or i[-4:] == ".wav":
music_list.append(i)
num = 1
volume = 0.2
pygame.mixer.music.set_volume(volume)
click = 0
......
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