Skip to content

Commit b6bb3ff

Browse files
sapiersapier
sapier
authored and
sapier
committedNov 9, 2013
Fix game buttons not beeing 48x48
1 parent 7bd30b5 commit b6bb3ff

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed
 

‎builtin/mm_menubar.lua

+8-7
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,28 @@ end
3030

3131
--------------------------------------------------------------------------------
3232
function menubar.refresh()
33-
menubar.formspec = "box[-0.3,5.625;12.4,1.3;#000000]" ..
33+
34+
menubar.formspec = "box[-0.3,5.625;12.4,1.2;#000000]" ..
3435
"box[-0.3,5.6;12.4,0.05;#FFFFFF]"
3536
menubar.buttons = {}
3637

37-
local button_base = -0.25
38+
local button_base = -0.08
3839

3940
local maxbuttons = #gamemgr.games
4041

41-
if maxbuttons > 10 then
42-
maxbuttons = 10
42+
if maxbuttons > 11 then
43+
maxbuttons = 11
4344
end
4445

4546
for i=1,maxbuttons,1 do
4647

4748
local btn_name = "menubar_btn_" .. gamemgr.games[i].id
48-
local buttonpos = button_base + (i-1) * 1.245
49+
local buttonpos = button_base + (i-1) * 1.1
4950
if gamemgr.games[i].menuicon_path ~= nil and
5051
gamemgr.games[i].menuicon_path ~= "" then
5152

5253
menubar.formspec = menubar.formspec ..
53-
"image_button[" .. buttonpos .. ",5.7;1.3,1.3;" ..
54+
"image_button[" .. buttonpos .. ",5.72;1.165,1.175;" ..
5455
engine.formspec_escape(gamemgr.games[i].menuicon_path) .. ";" ..
5556
btn_name .. ";;true;false]"
5657
else
@@ -65,7 +66,7 @@ function menubar.refresh()
6566
text = text .. "\n" .. part3
6667
end
6768
menubar.formspec = menubar.formspec ..
68-
"image_button[" .. buttonpos .. ",5.7;1.3,1.3;;" ..btn_name ..
69+
"image_button[" .. buttonpos .. ",5.72;1.165,1.175;;" ..btn_name ..
6970
";" .. text .. ";true;true]"
7071
end
7172

0 commit comments

Comments
 (0)
Please sign in to comment.