Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
pygame_lesson6_diy3
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
13bcf021
authored
4 years ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
ff71d04e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletions
my_music.py
my_music.py
View file @
13bcf021
...
...
@@ -60,37 +60,61 @@ while True:
num
=
0
pygame
.
mixer
.
music
.
load
(
path
+
"
\\
"
+
music_list
[
num
])
pygame
.
mixer
.
music
.
play
()
music1
=
pygame
.
mixer
.
Sound
(
path
+
"
\\
"
+
music_list
[
num
])
music_lenght
=
int
(
music1
.
get_length
())
play_button
=
stop_img
if
click
%
2
==
0
:
click
+=
2
else
:
click
+=
1
music1
=
pygame
.
mixer
.
Sound
()
music_lenght
=
int
(
music1
.
get_length
())
if
x
>
120
and
x
<
220
and
y
>
350
and
y
<
400
:
# 上一曲
num
-=
1
if
num
<
0
:
num
=
len
(
music_list
)
-
1
pygame
.
mixer
.
music
.
load
(
path
+
"
\\
"
+
music_list
[
num
])
pygame
.
mixer
.
music
.
play
()
music1
=
pygame
.
mixer
.
Sound
(
path
+
"
\\
"
+
music_list
[
num
])
music_lenght
=
int
(
music1
.
get_length
())
play_button
=
stop_img
if
click
%
2
==
0
:
click
+=
2
else
:
click
+=
1
music1
=
pygame
.
mixer
.
Sound
()
music_lenght
=
int
(
music1
.
get_length
())
if
pygame
.
mixer
.
music
.
get_busy
()
==
False
:
num
+=
1
if
num
>
len
(
music_list
)
-
1
:
num
=
0
pygame
.
mixer
.
music
.
load
(
path
+
"
\\
"
+
music_list
[
num
])
pygame
.
mixer
.
music
.
play
()
music1
=
pygame
.
mixer
.
Sound
(
path
+
"
\\
"
+
music_list
[
num
])
music_lenght
=
int
(
music1
.
get_length
())
play_time
=
pygame
.
mixer
.
music
.
get_pos
()
play_time
=
int
(
play_time
/
1000
)
play_m
=
play_time
//
60
play_s
=
play_time
%
60
if
play_s
<
10
:
play_s
=
"0"
+
str
(
play_s
)
print
(
play_s
)
print
(
play_s
)
music1
=
pygame
.
mixer
.
music
.
get_pos
()
music1
=
int
(
play_time
/
1000
)
music_m
=
music_lenght
//
60
music_s
=
music_lenght
%
60
if
music_s
<
10
:
music_s
=
"0"
+
str
(
music_s
)
print
(
str
(
music_m
)
+
":"
+
str
(
music_s
))
new_logo
=
pygame
.
transform
.
rotate
(
logo_img
,
angle
)
new_rect
=
new_logo
.
get_rect
(
center
=
(
320
,
200
))
pos
=
(
new_rect
[
0
],
new_rect
[
1
])
...
...
This diff is collapsed.
Click to expand it.
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