Commit 467d111c by BellCodeEditor

save project

parent 8ae608f2
Showing with 5 additions and 6 deletions
...@@ -3,7 +3,6 @@ import os ...@@ -3,7 +3,6 @@ import os
import pygame import pygame
from pygame import locals from pygame import locals
pygame.init() # 初始化 pygame.init() # 初始化
# 创建窗口 # 创建窗口
screen = pygame.display.set_mode((640, 480)) screen = pygame.display.set_mode((640, 480))
...@@ -14,7 +13,7 @@ stop_img = pygame.image.load('stop.png') # 暂停按钮 ...@@ -14,7 +13,7 @@ stop_img = pygame.image.load('stop.png') # 暂停按钮
last_img = pygame.image.load('last.png') # 上一曲按钮 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
t=[] p=[]
path="C:\\Users\\makcoo\\Desktop\\y" path="C:\\Users\\makcoo\\Desktop\\y"
filelist = os.listdir(path) filelist = os.listdir(path)
for i in filelist: for i in filelist:
...@@ -53,18 +52,18 @@ while True: ...@@ -53,18 +52,18 @@ while True:
if x>120 and x<220 and y>350 and y<400: if x>120 and x<220 and y>350 and y<400:
num-=1 num-=1
if num<0: if num<0:
num=len(path+'\\'music_list)-1 num=len(music_list)-1
click=0 click=0
play_img=stop_img play_img=stop_img
pygame.mixer.music.load(path+'\\'music_list) pygame.mixer.music.load(music_list)
pygame.mixer.music.play() pygame.mixer.music.play()
if x>120 and x<220 and y>350 and y<400: if x>120 and x<220 and y>350 and y<400:
num+=1 num+=1
if num<0: if num<0:
num=len(path+'\\'music_list)+1 num=len(music_list)+1
click=0 click=0
play_img=stop_img play_img=stop_img
pygame.mixer.music.load(path+'\\'music_list) pygame.mixer.music.load(music_list)
pygame.mixer.music.play() 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