Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tales of MajEyal
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tome
Tales of MajEyal
Commits
3604447c
Commit
3604447c
authored
10 years ago
by
Alex Ksandra
Browse files
Options
Downloads
Patches
Plain Diff
List commit.
parent
eee8e264
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!108
Font.draw convert
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
game/engines/default/engine/ui/Dropdown.lua
+3
-2
3 additions, 2 deletions
game/engines/default/engine/ui/Dropdown.lua
game/engines/default/engine/ui/List.lua
+5
-8
5 additions, 8 deletions
game/engines/default/engine/ui/List.lua
with
8 additions
and
10 deletions
game/engines/default/engine/ui/Dropdown.lua
+
3
−
2
View file @
3604447c
...
...
@@ -94,7 +94,8 @@ function _M:display(x, y, nb_keyframes)
local
item
=
self
.
c_list
.
list
[
self
.
c_list
.
sel
]
if
item
then
if
self
.
text_shadow
then
item
.
_tex
[
1
]:
toScreenFull
(
x
+
1
+
self
.
frame_sel
.
b4
.
w
,
y
+
1
,
self
.
c_list
.
fw
,
self
.
c_list
.
fh
,
item
.
_tex
[
2
],
item
.
_tex
[
3
],
0
,
0
,
0
,
self
.
text_shadow
)
end
item
.
_tex
[
1
]:
toScreenFull
(
x
+
self
.
frame_sel
.
b4
.
w
,
y
,
self
.
c_list
.
fw
,
self
.
c_list
.
fh
,
item
.
_tex
[
2
],
item
.
_tex
[
3
])
local
cy
=
(
self
.
c_list
.
fh
-
self
.
c_list
.
font_h
)
/
2
if
self
.
text_shadow
then
self
:
textureToScreen
(
item
.
_tex
,
x
+
1
+
self
.
frame_sel
.
b4
.
w
,
y
+
1
+
cy
,
0
,
0
,
0
,
self
.
text_shadow
)
end
self
:
textureToScreen
(
item
.
_tex
,
x
+
self
.
frame_sel
.
b4
.
w
,
y
+
cy
,
item
.
_tex_color
[
1
],
item
.
_tex_color
[
2
],
item
.
_tex_color
[
3
],
1
)
end
end
This diff is collapsed.
Click to expand it.
game/engines/default/engine/ui/List.lua
+
5
−
8
View file @
3604447c
...
...
@@ -51,8 +51,6 @@ function _M:generate()
local
fw
,
fh
=
self
.
w
,
self
.
font_h
+
6
self
.
fw
,
self
.
fh
=
fw
,
fh
if
not
self
.
surf
then
self
.
surf
=
core
.
display
.
newSurface
(
fw
,
fh
)
end
local
s
=
self
.
surf
self
.
frame
=
self
:
makeFrame
(
nil
,
fw
,
fh
)
self
.
frame_sel
=
self
:
makeFrame
(
"ui/selector-sel"
,
fw
,
fh
)
...
...
@@ -128,13 +126,11 @@ function _M:generate()
end
function
_M
:
drawItem
(
item
)
local
s
=
self
.
surf
local
color
=
item
.
color
or
{
255
,
255
,
255
}
local
text
=
item
[
self
.
display_prop
]
s
:
erase
(
0
,
0
,
0
,
0
)
s
:
drawColorStringBlended
(
self
.
font
,
text
,
0
,
(
self
.
fh
-
self
.
font_h
)
/
2
,
color
[
1
],
color
[
2
],
color
[
3
],
true
,
fw
)
item
.
_tex
=
{
s
:
glTexture
()}
item
.
_tex
=
self
:
drawFontLine
(
self
.
font
,
text
,
self
.
fw
)
item
.
_tex_color
=
{
color
[
1
]
/
255
,
color
[
2
]
/
255
,
color
[
3
]
/
255
}
end
function
_M
:
select
(
i
)
...
...
@@ -163,6 +159,7 @@ function _M:display(x, y, nb_keyframes)
local
bx
,
by
=
x
,
y
local
max
=
math.min
(
self
.
scroll
+
self
.
max_display
-
1
,
self
.
max
)
local
cy
=
(
self
.
fh
-
self
.
font_h
)
/
2
for
i
=
self
.
scroll
,
max
do
local
item
=
self
.
list
[
i
]
if
not
item
then
break
end
...
...
@@ -178,8 +175,8 @@ function _M:display(x, y, nb_keyframes)
if
item
.
focus_decay
<=
0
then
item
.
focus_decay
=
nil
end
end
end
if
self
.
text_shadow
then
item
.
_tex
[
1
]:
toScreenFull
(
x
+
1
+
self
.
frame_sel
.
b4
.
w
,
y
+
1
,
self
.
fw
,
self
.
fh
,
item
.
_tex
[
2
],
item
.
_tex
[
3
]
,
0
,
0
,
0
,
self
.
text_shadow
)
end
item
.
_tex
[
1
]:
toScreenFull
(
x
+
self
.
frame_sel
.
b4
.
w
,
y
,
self
.
fw
,
self
.
fh
,
item
.
_tex
[
2
],
item
.
_tex
[
3
]
)
if
self
.
text_shadow
then
self
:
textureToScreen
(
item
.
_tex
,
x
+
1
+
self
.
frame_sel
.
b4
.
w
,
y
+
1
+
cy
,
0
,
0
,
0
,
self
.
text_shadow
)
end
self
:
textureToScreen
(
item
.
_tex
,
x
+
self
.
frame_sel
.
b4
.
w
,
y
+
cy
,
item
.
_tex_color
[
1
]
,
item
.
_tex
_color
[
2
],
item
.
_tex
_color
[
3
],
1
)
y
=
y
+
self
.
fh
end
...
...
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