Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
pygame_lesson6_diy2
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
819529e6
authored
3 years ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
d4e31e9c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
my_music.py
my_music.py
View file @
819529e6
...
...
@@ -85,12 +85,11 @@ while True:
music0
=
pygame
.
mixer
.
Sound
(
path
+
"
\\
"
+
music_list
[
num
])
music_length
=
music0
.
get_length
()
music_length
=
int
(
music_length
)
play_time
=
pygame
.
mixer
.
music
.
get_pos
()
play_time
=
int
(
play_time
/
1000
)
play_m
=
play_time
//
60
play_s
=
play_time
%
60
play_ms
=
str
(
play_m
)
+
str
(
play_s
)
ujm
=
we
.
render
(
play_ms
,
True
,(
0
,
0
,
0
))
play_time
=
pygame
.
mixer
.
music
.
get_pos
()
play_time
=
int
(
play_time
/
1000
)
play_m
=
play_time
//
60
play_s
=
play_time
%
60
play_ms
=
str
(
play_m
)
+
str
(
play_s
)
if
pygame
.
mixer
.
music
.
get_busy
()
==
False
:
num
+=
1
...
...
@@ -112,7 +111,7 @@ while True:
screen
.
blit
(
e
,
(
l
[
0
],
l
[
1
]))
# 中间logo图
screen
.
blit
(
last_img
,
(
120
,
350
))
# 上一曲
screen
.
blit
(
next_img
,
(
420
,
350
))
# 下一曲
mn
=
we
.
render
(,
True
,(
255
,
255
,
255
))
mn
=
we
.
render
(
play_ms
,
True
,(
255
,
255
,
255
))
screen
.
blit
(
mn
,(
120
,
450
))
# 刷新画面
pygame
.
display
.
update
()
...
...
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