Commit d23fc4da by BellCodeEditor

save project

parent f58049cb
Showing with 13 additions and 3 deletions
...@@ -3,6 +3,7 @@ from pygame import locals ...@@ -3,6 +3,7 @@ from pygame import locals
import os import os
pygame.init() # 初始化 pygame.init() # 初始化
FPS=pygame.time.Clock()
# 创建窗口 # 创建窗口
screen = pygame.display.set_mode((640, 480)) screen = pygame.display.set_mode((640, 480))
# 载入图片、资源 # 载入图片、资源
...@@ -14,7 +15,7 @@ next_img = pygame.image.load('next.png') # 下一曲按钮 ...@@ -14,7 +15,7 @@ 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\\玛酷机器人5\\Desktop\\test' path ='C:\\Users\\Administrator\\Desktop\\test'
filelist = os.listdir(path) filelist = os.listdir(path)
num = -1 num = -1
for i in filelist: for i in filelist:
...@@ -95,4 +96,14 @@ while True: ...@@ -95,4 +96,14 @@ while True:
screen.blit(last_img, (120, 350)) # 上一曲 screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲 screen.blit(next_img, (420, 350)) # 下一曲
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
\ No newline at end of file
FPS.tick(60)
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