forked from minetest-mods/unified_inventory
Fix offset of buttons
This commit is contained in:
parent
88a740c840
commit
dcb7f2ec2b
@ -22,15 +22,13 @@ function unified_inventory.get_formspec(player, page)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Main buttons
|
-- Main buttons
|
||||||
local i = 0
|
|
||||||
for i, def in pairs(unified_inventory.buttons) do
|
for i, def in pairs(unified_inventory.buttons) do
|
||||||
if def.type == "image" then
|
if def.type == "image" then
|
||||||
formspec = formspec.."image_button["
|
formspec = formspec.."image_button["
|
||||||
..(0.65 * i)..",9;0.8,0.8;"
|
..(0.65 * (i - 1))..",9;0.8,0.8;"
|
||||||
..minetest.formspec_escape(def.image)..";"
|
..minetest.formspec_escape(def.image)..";"
|
||||||
..minetest.formspec_escape(def.name)..";]"
|
..minetest.formspec_escape(def.name)..";]"
|
||||||
end
|
end
|
||||||
i = i + 1
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Controls to flip items pages
|
-- Controls to flip items pages
|
||||||
|
Loading…
Reference in New Issue
Block a user