summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2013-11-09 13:56:36 +0100
committersapier <Sapier at GMX dot net>2013-11-09 13:58:57 +0100
commitb6bb3ffec43197b808fdc3c1dda6cb7823cd49e5 (patch)
tree3cc3095aa5c7df0867c8faa4091caa408e3af4c3 /builtin
parent7bd30b59eee2f18ac7b893151f18d04711d665bc (diff)
downloadminetest-b6bb3ffec43197b808fdc3c1dda6cb7823cd49e5.tar.gz
minetest-b6bb3ffec43197b808fdc3c1dda6cb7823cd49e5.tar.bz2
minetest-b6bb3ffec43197b808fdc3c1dda6cb7823cd49e5.zip
Fix game buttons not beeing 48x48
Diffstat (limited to 'builtin')
-rw-r--r--builtin/mm_menubar.lua15
1 files changed, 8 insertions, 7 deletions
diff --git a/builtin/mm_menubar.lua b/builtin/mm_menubar.lua
index a60ea7ae5..2e4d5f8b8 100644
--- a/builtin/mm_menubar.lua
+++ b/builtin/mm_menubar.lua
@@ -30,27 +30,28 @@ end
--------------------------------------------------------------------------------
function menubar.refresh()
- menubar.formspec = "box[-0.3,5.625;12.4,1.3;#000000]" ..
+
+ menubar.formspec = "box[-0.3,5.625;12.4,1.2;#000000]" ..
"box[-0.3,5.6;12.4,0.05;#FFFFFF]"
menubar.buttons = {}
- local button_base = -0.25
+ local button_base = -0.08
local maxbuttons = #gamemgr.games
- if maxbuttons > 10 then
- maxbuttons = 10
+ if maxbuttons > 11 then
+ maxbuttons = 11
end
for i=1,maxbuttons,1 do
local btn_name = "menubar_btn_" .. gamemgr.games[i].id
- local buttonpos = button_base + (i-1) * 1.245
+ local buttonpos = button_base + (i-1) * 1.1
if gamemgr.games[i].menuicon_path ~= nil and
gamemgr.games[i].menuicon_path ~= "" then
menubar.formspec = menubar.formspec ..
- "image_button[" .. buttonpos .. ",5.7;1.3,1.3;" ..
+ "image_button[" .. buttonpos .. ",5.72;1.165,1.175;" ..
engine.formspec_escape(gamemgr.games[i].menuicon_path) .. ";" ..
btn_name .. ";;true;false]"
else
@@ -65,7 +66,7 @@ function menubar.refresh()
text = text .. "\n" .. part3
end
menubar.formspec = menubar.formspec ..
- "image_button[" .. buttonpos .. ",5.7;1.3,1.3;;" ..btn_name ..
+ "image_button[" .. buttonpos .. ",5.72;1.165,1.175;;" ..btn_name ..
";" .. text .. ";true;true]"
end