forked from Mirrorlandia_minetest/minetest
Fix forgotten favourite list image update of simple menu
This commit is contained in:
parent
21ee434832
commit
663e42ca3f
@ -34,6 +34,14 @@ local function render_client_count(n)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
function image_column(tooltip, flagname)
|
||||||
|
return "image," ..
|
||||||
|
"tooltip=" .. core.formspec_escape(tooltip) .. "," ..
|
||||||
|
"0=" .. core.formspec_escape(defaulttexturedir .. "blank.png") .. "," ..
|
||||||
|
"1=" .. core.formspec_escape(defaulttexturedir .. "server_flags_" .. flagname .. ".png")
|
||||||
|
end
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
function render_favorite(spec,render_details)
|
function render_favorite(spec,render_details)
|
||||||
local text = ""
|
local text = ""
|
||||||
|
@ -52,12 +52,6 @@ local function get_formspec(tabview, name, tabdata)
|
|||||||
";]"
|
";]"
|
||||||
|
|
||||||
--favourites
|
--favourites
|
||||||
local function image_column(tooltip, flagname)
|
|
||||||
return "image," ..
|
|
||||||
"tooltip=" .. core.formspec_escape(tooltip) .. "," ..
|
|
||||||
"0=" .. core.formspec_escape(defaulttexturedir .. "blank.png") .. "," ..
|
|
||||||
"1=" .. core.formspec_escape(defaulttexturedir .. "server_flags_" .. flagname .. ".png")
|
|
||||||
end
|
|
||||||
if render_details then
|
if render_details then
|
||||||
retval = retval .. "tablecolumns[" ..
|
retval = retval .. "tablecolumns[" ..
|
||||||
"color,span=3;" ..
|
"color,span=3;" ..
|
||||||
|
@ -36,9 +36,21 @@ local function get_formspec(tabview, name, tabdata)
|
|||||||
core.formspec_escape(core.setting_get("name")) .."]" ..
|
core.formspec_escape(core.setting_get("name")) .."]" ..
|
||||||
"pwdfield[8.75,2.3;3.5,0.5;te_pwd;]"
|
"pwdfield[8.75,2.3;3.5,0.5;te_pwd;]"
|
||||||
|
|
||||||
--favourites
|
if render_details then
|
||||||
|
retval = retval .. "tablecolumns[" ..
|
||||||
|
"color,span=3;" ..
|
||||||
|
"text,align=right;" .. -- clients
|
||||||
|
"text,align=center,padding=0.25;" .. -- "/"
|
||||||
|
"text,align=right,padding=0.25;" .. -- clients_max
|
||||||
|
image_column("Creative mode", "creative") .. ",padding=1;" ..
|
||||||
|
image_column("Damage enabled", "damage") .. ",padding=0.25;" ..
|
||||||
|
image_column("PvP enabled", "pvp") .. ",padding=0.25;" ..
|
||||||
|
"text,padding=1]" -- name
|
||||||
|
else
|
||||||
|
retval = retval .. "tablecolumns[text]"
|
||||||
|
end
|
||||||
retval = retval ..
|
retval = retval ..
|
||||||
"textlist[-0.05,0.0;7.55,2.75;favourites;"
|
"table[-0.05,0;7.55,2.75;favourites;"
|
||||||
|
|
||||||
if #menudata.favorites > 0 then
|
if #menudata.favorites > 0 then
|
||||||
retval = retval .. render_favorite(menudata.favorites[1],render_details)
|
retval = retval .. render_favorite(menudata.favorites[1],render_details)
|
||||||
|
Loading…
Reference in New Issue
Block a user