Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
illuna-minetest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
illuna-minetest
Commits
18c583ee
Commit
18c583ee
authored
10 years ago
by
Wuzzy
Committed by
RealBadAngel
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add tooltips to main menu subgames button bar
parent
9b551d5c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
builtin/fstk/buttonbar.lua
+5
-4
5 additions, 4 deletions
builtin/fstk/buttonbar.lua
builtin/mainmenu/tab_singleplayer.lua
+2
-1
2 additions, 1 deletion
builtin/mainmenu/tab_singleplayer.lua
with
7 additions
and
5 deletions
builtin/fstk/buttonbar.lua
+
5
−
4
View file @
18c583ee
...
...
@@ -57,10 +57,10 @@ local function buttonbar_formspec(self)
end
formspec
=
formspec
..
string.format
(
"image_button[%f,%f;%f,%f;%s;%s;%s;true;%s]"
,
string.format
(
"image_button[%f,%f;%f,%f;%s;%s;%s;true;%s]
tooltip[%s;%s]
"
,
btn_pos
.
x
,
btn_pos
.
y
,
self
.
btn_size
,
self
.
btn_size
,
self
.
buttons
[
i
].
image
,
btn_name
,
self
.
buttons
[
i
].
caption
,
borders
)
borders
,
btn_name
,
self
.
buttons
[
i
].
tooltip
)
else
--print("end of displayable buttons: orientation: " .. self.orientation)
--print( "button_end: " .. (btn_pos.y + self.btn_size - (self.btn_size * 0.05)))
...
...
@@ -140,11 +140,12 @@ local buttonbar_metatable = {
delete
=
function
(
self
)
ui
.
delete
(
self
)
end
,
add_button
=
function
(
self
,
name
,
caption
,
image
)
add_button
=
function
(
self
,
name
,
caption
,
image
,
tooltip
)
if
caption
==
nil
then
caption
=
""
end
if
image
==
nil
then
image
=
""
end
if
tooltip
==
nil
then
tooltip
=
""
end
table.insert
(
self
.
buttons
,{
name
=
name
,
caption
=
caption
,
image
=
image
})
table.insert
(
self
.
buttons
,{
name
=
name
,
caption
=
caption
,
image
=
image
,
tooltip
=
tooltip
})
if
self
.
orientation
==
"horizontal"
then
if
(
(
self
.
btn_size
*
#
self
.
buttons
)
+
(
self
.
btn_size
*
0
.
05
*
2
)
>
self
.
size
.
x
)
then
...
...
This diff is collapsed.
Click to expand it.
builtin/mainmenu/tab_singleplayer.lua
+
2
−
1
View file @
18c583ee
...
...
@@ -53,6 +53,7 @@ local function singleplayer_refresh_gamebar()
local
image
=
nil
local
text
=
nil
local
tooltip
=
core
.
formspec_escape
(
gamemgr
.
games
[
i
].
name
)
if
gamemgr
.
games
[
i
].
menuicon_path
~=
nil
and
gamemgr
.
games
[
i
].
menuicon_path
~=
""
then
...
...
@@ -69,7 +70,7 @@ local function singleplayer_refresh_gamebar()
text
=
text
..
"
\n
"
..
part3
end
end
btnbar
:
add_button
(
btn_name
,
text
,
image
)
btnbar
:
add_button
(
btn_name
,
text
,
image
,
tooltip
)
end
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