Commit d734da2d by BellCodeEditor

auto save

parent b5e2b02d
Showing with 10 additions and 2 deletions
import os
filelist = os.listdir("C:\\Users\\17321\\Desktop\\text")
print(filelist)
\ No newline at end of file
import pygame
from pygame import locals
import os
pygame.init() # 初始化
# 创建窗口
screen = pygame.display.set_mode((640, 480))
......@@ -13,8 +13,12 @@ next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮
# 载入音乐
pygame.mixer.music.load('歌曲1.wav') # 载入音乐
path = "I:\\"
filelist = os.listdir(path)
print(filelist)
pygame.mixer.music.load(path+"\\"+filelist[4]) # 载入音乐
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