Commit 7e31b0e5 by BellCodeEditor

auto save

parent 441cfa42
Showing with 9 additions and 0 deletions
...@@ -2,6 +2,7 @@ import pygame ...@@ -2,6 +2,7 @@ import pygame
from pygame import locals from pygame import locals
pygame.init() # 初始化 pygame.init() # 初始化
pygame.mixer.init()
# 创建窗口 # 创建窗口
screen = pygame.display.set_mode((640, 480)) screen = pygame.display.set_mode((640, 480))
# 载入图片、资源 # 载入图片、资源
...@@ -12,10 +13,18 @@ last_img = pygame.image.load('last.png') # 上一曲按钮 ...@@ -12,10 +13,18 @@ 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 logo_img = pygame.image.load('logo.png') # 中间logo
pygame.mixer.music.load("")
volume = 0.5
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type == pygame.QUIT: if event.type == pygame.QUIT:
exit() exit()
if event.type ==pygame.KEYDOWN:
if
if pygame.mixer.music.get_busy()==False:
pygame.mixer.music.play()
# 绘制画面 # 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景 screen.blit(bg_img, (0, 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