Fix
This commit is contained in:
parent
328ad308f3
commit
4deee41ef2
12
init.lua
12
init.lua
|
@ -2020,20 +2020,20 @@ local function make_fs(player, data)
|
||||||
data.xoffset = ROWS + 1.23
|
data.xoffset = ROWS + 1.23
|
||||||
local full_height = LINES + 1.73
|
local full_height = LINES + 1.73
|
||||||
|
|
||||||
|
local tab = tabs[data.current_tab]
|
||||||
|
local hide_panels = tab.hide_panels and tab.hide_panels(player, data)
|
||||||
|
local show_panels = data.query_item and not hide_panels
|
||||||
|
|
||||||
fs(fmt("formspec_version[%u]size[%f,%f]no_prepend[]bgcolor[#0000]",
|
fs(fmt("formspec_version[%u]size[%f,%f]no_prepend[]bgcolor[#0000]",
|
||||||
MIN_FORMSPEC_VERSION, data.xoffset + (data.query_item and 8 or 0), full_height), styles)
|
MIN_FORMSPEC_VERSION, data.xoffset + (show_panels and 8 or 0), full_height), styles)
|
||||||
|
|
||||||
fs(fmt("bg9", 0, 0, data.xoffset, full_height, PNG.bg_full, 10))
|
fs(fmt("bg9", 0, 0, data.xoffset, full_height, PNG.bg_full, 10))
|
||||||
|
|
||||||
local tab = tabs[data.current_tab]
|
|
||||||
|
|
||||||
if tab then
|
if tab then
|
||||||
tab.formspec(player, data, fs)
|
tab.formspec(player, data, fs)
|
||||||
end
|
end
|
||||||
|
|
||||||
local hide_panels = tab.hide_panels and tab.hide_panels(player, data)
|
if show_panels then
|
||||||
|
|
||||||
if data.query_item and not hide_panels then
|
|
||||||
get_panels(player, data, fs)
|
get_panels(player, data, fs)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Ŝarĝante…
Reference in New Issue