Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
Petal Hero
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dos
Petal Hero
Commits
0c99eb7b
Verified
Commit
0c99eb7b
authored
1 year ago
by
dos
Browse files
Options
Downloads
Patches
Plain Diff
Song info on loading screen
parent
132766ef
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
difficulty.py
+1
-1
1 addition, 1 deletion
difficulty.py
loading.py
+18
-2
18 additions, 2 deletions
loading.py
select.py
+1
-1
1 addition, 1 deletion
select.py
song.py
+2
-1
2 additions, 1 deletion
song.py
songinfo.py
+3
-3
3 additions, 3 deletions
songinfo.py
with
25 additions
and
8 deletions
difficulty.py
+
1
−
1
View file @
0c99eb7b
...
@@ -65,7 +65,7 @@ class DifficultyView(BaseView):
...
@@ -65,7 +65,7 @@ class DifficultyView(BaseView):
else
:
else
:
ctx
.
gray
(
0.5
+
min
(
abs
(
distance
/
2
),
0.5
))
ctx
.
gray
(
0.5
+
min
(
abs
(
distance
/
2
),
0.5
))
if
abs
(
distance
)
<
=
3
:
if
abs
(
distance
)
<
3
:
xpos
=
0.0
xpos
=
0.0
ctx
.
font_size
=
24
-
abs
(
distance
)
*
3
ctx
.
font_size
=
24
-
abs
(
distance
)
*
3
if
target
and
(
width
:
=
ctx
.
text_width
(
str
(
diff
)))
>
220
:
if
target
and
(
width
:
=
ctx
.
text_width
(
str
(
diff
)))
>
220
:
...
...
This diff is collapsed.
Click to expand it.
loading.py
+
18
−
2
View file @
0c99eb7b
...
@@ -15,12 +15,28 @@ class LoadingView(BaseView):
...
@@ -15,12 +15,28 @@ class LoadingView(BaseView):
def
draw
(
self
,
ctx
:
Context
)
->
None
:
def
draw
(
self
,
ctx
:
Context
)
->
None
:
# Paint the background black
# Paint the background black
ctx
.
rgb
(
0
,
0
,
0
).
rectangle
(
-
120
,
-
120
,
240
,
240
).
fill
()
ctx
.
rgb
(
0
,
0
,
0
).
rectangle
(
-
120
,
-
120
,
240
,
240
).
fill
()
ctx
.
font
=
"
Camp Font 3
"
ctx
.
font_size
=
32
ctx
.
text_align
=
ctx
.
CENTER
ctx
.
text_align
=
ctx
.
CENTER
ctx
.
text_baseline
=
ctx
.
MIDDLE
ctx
.
text_baseline
=
ctx
.
MIDDLE
ctx
.
font
=
"
Camp Font 3
"
ctx
.
font_size
=
32
while
ctx
.
text_width
(
self
.
song
.
name
)
>
220
:
ctx
.
font_size
-=
1
ctx
.
move_to
(
0
,
0
)
ctx
.
move_to
(
0
,
0
)
ctx
.
gray
(
1.0
)
ctx
.
gray
(
1.0
)
ctx
.
text
(
self
.
song
.
name
)
name_size
=
ctx
.
font_size
ctx
.
font_size
=
min
(
22
,
name_size
)
while
ctx
.
text_width
(
self
.
song
.
artist
)
>
220
:
ctx
.
font_size
-=
1
ctx
.
move_to
(
0
,
-
name_size
)
ctx
.
gray
(
0.75
)
ctx
.
text
(
self
.
song
.
artist
)
ctx
.
font_size
=
18
ctx
.
move_to
(
0
,
60
)
ctx
.
gray
(
0.5
)
ctx
.
text
(
"
Loading...
"
)
ctx
.
text
(
"
Loading...
"
)
def
think
(
self
,
ins
:
InputState
,
delta_ms
:
int
)
->
None
:
def
think
(
self
,
ins
:
InputState
,
delta_ms
:
int
)
->
None
:
...
...
This diff is collapsed.
Click to expand it.
select.py
+
1
−
1
View file @
0c99eb7b
...
@@ -183,7 +183,7 @@ class SelectView(BaseView):
...
@@ -183,7 +183,7 @@ class SelectView(BaseView):
else
:
else
:
ctx
.
gray
(
0.5
+
min
(
abs
(
distance
/
2
),
0.5
))
ctx
.
gray
(
0.5
+
min
(
abs
(
distance
/
2
),
0.5
))
if
abs
(
distance
)
<
=
3
:
if
abs
(
distance
)
<
3
:
song
.
load
()
song
.
load
()
xpos
=
0.0
xpos
=
0.0
ctx
.
font_size
=
24
-
abs
(
distance
)
*
3
ctx
.
font_size
=
24
-
abs
(
distance
)
*
3
...
...
This diff is collapsed.
Click to expand it.
song.py
+
2
−
1
View file @
0c99eb7b
...
@@ -298,6 +298,7 @@ class SongView(BaseView):
...
@@ -298,6 +298,7 @@ class SongView(BaseView):
media
.
think
(
delta_ms
)
media
.
think
(
delta_ms
)
if
self
.
input
.
buttons
.
os
.
middle
.
pressed
and
not
self
.
is_active
():
if
self
.
input
.
buttons
.
os
.
middle
.
pressed
and
not
self
.
is_active
():
while
not
self
.
vm
.
is_active
(
self
.
app
):
self
.
vm
.
pop
(
ViewTransitionSwipeRight
())
self
.
vm
.
pop
(
ViewTransitionSwipeRight
())
if
not
self
.
is_active
():
if
not
self
.
is_active
():
...
...
This diff is collapsed.
Click to expand it.
songinfo.py
+
3
−
3
View file @
0c99eb7b
...
@@ -82,9 +82,9 @@ class SongInfo(object):
...
@@ -82,9 +82,9 @@ class SongInfo(object):
diffs
=
f
.
read
(
10
)
diffs
=
f
.
read
(
10
)
for
b
in
diffs
:
for
b
in
diffs
:
self
.
_difficulties
.
append
(
difficulties
[
int
(
b
)])
self
.
_difficulties
.
append
(
difficulties
[
int
(
b
)])
if
not
self
.
_difficulties
:
#
if not self._difficulties:
# os.unlink(diffFileName) # unlink's broken
# os.unlink(diffFileName) # unlink's broken
raise
Exception
#
raise Exception
self
.
_difficulties
.
sort
(
key
=
lambda
a
:
a
.
id
,
reverse
=
True
)
self
.
_difficulties
.
sort
(
key
=
lambda
a
:
a
.
id
,
reverse
=
True
)
return
self
.
_difficulties
return
self
.
_difficulties
except
Exception
as
e
:
except
Exception
as
e
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment