Commit 0cbd3c57 by BellCodeEditor

auto save

parent bfd4e82f
Showing with 7 additions and 2 deletions
import pygame
from pygame import locals
import os
pygame.init() # 初始化
# 创建窗口
......@@ -14,14 +15,13 @@ logo_img = pygame.image.load('logo.png') # 下一曲按钮
# 载入音乐
pygame.mixer.music.load('歌曲4.ogg') # 载入音乐
list_music = []
volume = 0.2
pygame.mixer.music.set_volume(volume) # 初始播放音量
click = 0
play_button = stop_img
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
......@@ -51,6 +51,11 @@ while True:
pygame.mixer.music.pause()
if pygame.mixer.music.get_busy() == False:
list_number += 1
for path in list_music:
if path[-4:] = ".mp3":
list_music.append(path)
pygame.mixer.music.play()
# 绘制画面
......
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