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
e340fc00
authored
a year ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
edf85d26
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletions
my_music.py
my_music.py
View file @
e340fc00
...
...
@@ -59,6 +59,9 @@ while True:
num
=
0
pygame
.
mixer
.
music
.
load
(
path
+
"
\\
"
+
music_list
[
num
])
pygame
.
mixer
.
music
.
play
()
music_time
=
pygame
.
mixer
.
Sound
(
path
+
"
\\
"
+
music_list
[
num
])
music_length
=
music1
.
get_length
()
music_length
=
int
(
music_length
)
play_button
=
stop_img
if
click
%
2
==
0
:
click
+=
2
...
...
@@ -71,6 +74,9 @@ while True:
num
=
len
(
music_list
)
-
1
pygame
.
mixer
.
music
.
load
(
path
+
"
\\
"
+
music_list
[
num
])
pygame
.
mixer
.
music
.
play
()
music_time
=
pygame
.
mixer
.
Sound
(
path
+
"
\\
"
+
music_list
[
num
])
music_length
=
music1
.
get_length
()
music_length
=
int
(
music_length
)
play_button
=
stop_img
if
click
%
2
==
0
:
click
+=
2
...
...
@@ -83,10 +89,21 @@ while True:
num
=
0
pygame
.
mixer
.
music
.
load
(
path
+
"
\\
"
+
music_list
[
num
])
pygame
.
mixer
.
music
.
play
()
music1_time
=
pygame
.
mixer
.
Sound
(
path
+
"
\\
"
+
music_list
[
num
])
music_length
=
music1
.
get_length
()
music_length
=
int
(
music_length
)
p
=
pygame
.
mixer
.
music
.
get_pos
()
p
=
int
(
p
/
1000
)
p_m
=
p
//
60
p_s
=
p
%
60
if
play_s
<
10
:
play_s
=
"0"
+
str
(
play_s
)
info
=
str
(
p_m
)
+
":"
+
str
(
p_s
)
music_m
=
p
//
60
music_s
=
p
%
60
if
music_s
<
10
:
music_s
=
"0"
+
str
(
music_s
)
info
=
str
(
p_m
)
+
":"
+
str
(
p_s
)
new_logo
=
pygame
.
transform
.
rotate
(
logo_img
,
angle
)
newRet
=
new_logo
.
get_rect
(
center
=
(
320
,
200
))
...
...
@@ -98,5 +115,8 @@ while True:
screen
.
blit
(
logo_img
,
(
170
,
60
))
screen
.
blit
(
last_img
,
(
120
,
350
))
screen
.
blit
(
next_img
,
(
420
,
350
))
scoreSur
=
basic_font
.
render
(
info
,
True
,(
225
,
225
,
225
))
screen
.
blit
(
scoreSur
,(
120
,
440
))
scoreSurf2
=
basic_font
.
render
(
"/"
+
info2
,
True
,(
0
,
0
,
0
))
screen
.
blit
(
scoreSurf2
,(
170
,
440
))
pygame
.
display
.
update
()
\ No newline at end of file
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