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
6e260895
authored
a year ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
b21706d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletions
my_music.py
my_music.py
View file @
6e260895
...
...
@@ -13,6 +13,7 @@ last_img = pygame.image.load('last.png') # 上一曲按钮
next_img
=
pygame
.
image
.
load
(
'next.png'
)
# 下一曲按钮
logo_img
=
pygame
.
image
.
load
(
'logo.png'
)
# 下一曲按钮
my_font
=
pygame
.
font
.
Font
(
"neuropol.ttf"
,
30
)
music_list
=
[]
path
=
"C:
\\
Users
\
Public
\\
Music
\\
Sample Music"
filelist
=
os
.
listdir
(
path
)
...
...
@@ -92,5 +93,13 @@ while True:
screen
.
blit
(
new_logo
,
(
new_rect
[
0
],
new_rect
[
1
]))
screen
.
blit
(
last_img
,
(
120
,
350
))
screen
.
blit
(
next_img
,
(
420
,
350
))
renct_time
=
pygame
.
mixer
.
music
.
get_pos
()
renct_time
=
renct_time
//
1000
m
=
renct_time
//
60
s
=
renct_time
%
60
info
=
str
(
m
)
+
":"
+
str
(
s
)
text
=
my_font
.
render
(
info
,
True
,(
254
,
254
,
254
))
screen
.
blit
(
text
,(
60
,
400
))
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