Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
pygame_lesson5_diy1
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7bd7d397
authored
Apr 17, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
1125cf6f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
my_music.py
test.wav
my_music.py
View file @
7bd7d397
...
@@ -14,7 +14,7 @@ logo_img = pygame.image.load('logo.png') # 下一曲按钮
...
@@ -14,7 +14,7 @@ logo_img = pygame.image.load('logo.png') # 下一曲按钮
# 载入音乐
# 载入音乐
file_list
=
[]
file_list
=
[]
path
=
"C:
\\
Users
\\
Administrator
\\
Desktop
\\
t
e
st"
path
=
"C:
\\
Users
\\
Administrator
\\
Desktop
\\
tst"
filelist
=
os
.
listdir
(
path
)
filelist
=
os
.
listdir
(
path
)
for
i
in
filelist
:
for
i
in
filelist
:
if
i
[
-
4
:]
==
".ogg"
or
i
[
-
4
:]
==
".wav"
:
if
i
[
-
4
:]
==
".ogg"
or
i
[
-
4
:]
==
".wav"
:
...
@@ -59,7 +59,15 @@ while True:
...
@@ -59,7 +59,15 @@ while True:
else
:
else
:
play_button
=
play_img
play_button
=
play_img
pygame
.
mixer
.
music
.
pause
()
pygame
.
mixer
.
music
.
pause
()
if
x
>
120
and
x
<
350
and
y
>
350
and
y
<
400
:
click
-=
1
if
click
%
2
==
0
:
play_button
=
stop_img
pygame
.
mixer
.
music
.
unpause
()
else
:
play_button
=
play_img
pygame
.
mixer
.
music
.
pause
()
play_button
=
stop_img
if
pygame
.
mixer
.
music
.
get_busy
()
==
False
:
if
pygame
.
mixer
.
music
.
get_busy
()
==
False
:
unm
+=
1
unm
+=
1
if
unm
>
len
(
filelist
)
-
1
:
if
unm
>
len
(
filelist
)
-
1
:
...
...
test.wav
deleted
100644 → 0
View file @
1125cf6f
File deleted
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment