mirror of
https://github.com/minetest/minetest.git
synced 2024-12-24 15:12:23 +01:00
Improve layout of main menu 'local' tab (#10366)
This commit is contained in:
parent
995d405261
commit
a69bc67ce2
@ -114,45 +114,44 @@ local function get_formspec(tabview, name, tabdata)
|
|||||||
)
|
)
|
||||||
|
|
||||||
retval = retval ..
|
retval = retval ..
|
||||||
"button[4,3.95;2.6,1;world_delete;".. fgettext("Delete") .. "]" ..
|
"button[3.9,3.8;2.8,1;world_delete;".. fgettext("Delete") .. "]" ..
|
||||||
"button[6.5,3.95;2.8,1;world_configure;".. fgettext("Configure") .. "]" ..
|
"button[6.55,3.8;2.8,1;world_configure;".. fgettext("Configure") .. "]" ..
|
||||||
"button[9.2,3.95;2.5,1;world_create;".. fgettext("New") .. "]" ..
|
"button[9.2,3.8;2.8,1;world_create;".. fgettext("New") .. "]" ..
|
||||||
"label[4,-0.25;".. fgettext("Select World:") .. "]"..
|
"label[3.9,-0.05;".. fgettext("Select World:") .. "]"..
|
||||||
"checkbox[0.25,0.25;cb_creative_mode;".. fgettext("Creative Mode") .. ";" ..
|
"checkbox[0,-0.20;cb_creative_mode;".. fgettext("Creative Mode") .. ";" ..
|
||||||
dump(core.settings:get_bool("creative_mode")) .. "]"..
|
dump(core.settings:get_bool("creative_mode")) .. "]"..
|
||||||
"checkbox[0.25,0.7;cb_enable_damage;".. fgettext("Enable Damage") .. ";" ..
|
"checkbox[0,0.25;cb_enable_damage;".. fgettext("Enable Damage") .. ";" ..
|
||||||
dump(core.settings:get_bool("enable_damage")) .. "]"..
|
dump(core.settings:get_bool("enable_damage")) .. "]"..
|
||||||
"checkbox[0.25,1.15;cb_server;".. fgettext("Host Server") ..";" ..
|
"checkbox[0,0.7;cb_server;".. fgettext("Host Server") ..";" ..
|
||||||
dump(core.settings:get_bool("enable_server")) .. "]" ..
|
dump(core.settings:get_bool("enable_server")) .. "]" ..
|
||||||
"textlist[4,0.25;7.5,3.7;sp_worlds;" ..
|
"textlist[3.9,0.4;7.9,3.45;sp_worlds;" ..
|
||||||
menu_render_worldlist() ..
|
menu_render_worldlist() ..
|
||||||
";" .. index .. "]"
|
";" .. index .. "]"
|
||||||
|
|
||||||
if core.settings:get_bool("enable_server") then
|
if core.settings:get_bool("enable_server") then
|
||||||
retval = retval ..
|
retval = retval ..
|
||||||
"button[8.5,4.8;3.2,1;play;".. fgettext("Host Game") .. "]" ..
|
"button[7.9,4.75;4.1,1;play;".. fgettext("Host Game") .. "]" ..
|
||||||
"checkbox[0.25,1.6;cb_server_announce;" .. fgettext("Announce Server") .. ";" ..
|
"checkbox[0,1.15;cb_server_announce;" .. fgettext("Announce Server") .. ";" ..
|
||||||
dump(core.settings:get_bool("server_announce")) .. "]" ..
|
dump(core.settings:get_bool("server_announce")) .. "]" ..
|
||||||
"label[0.25,2.2;" .. fgettext("Name/Password") .. "]" ..
|
"field[0.3,2.85;3.8,0.5;te_playername;" .. fgettext("Name") .. ";" ..
|
||||||
"field[0.55,3.2;3.5,0.5;te_playername;;" ..
|
|
||||||
core.formspec_escape(core.settings:get("name")) .. "]" ..
|
core.formspec_escape(core.settings:get("name")) .. "]" ..
|
||||||
"pwdfield[0.55,4;3.5,0.5;te_passwd;]"
|
"pwdfield[0.3,4.05;3.8,0.5;te_passwd;" .. fgettext("Password") .. "]"
|
||||||
|
|
||||||
local bind_addr = core.settings:get("bind_address")
|
local bind_addr = core.settings:get("bind_address")
|
||||||
if bind_addr ~= nil and bind_addr ~= "" then
|
if bind_addr ~= nil and bind_addr ~= "" then
|
||||||
retval = retval ..
|
retval = retval ..
|
||||||
"field[0.55,5.2;2.25,0.5;te_serveraddr;" .. fgettext("Bind Address") .. ";" ..
|
"field[0.3,5.25;2.5,0.5;te_serveraddr;" .. fgettext("Bind Address") .. ";" ..
|
||||||
core.formspec_escape(core.settings:get("bind_address")) .. "]" ..
|
core.formspec_escape(core.settings:get("bind_address")) .. "]" ..
|
||||||
"field[2.8,5.2;1.25,0.5;te_serverport;" .. fgettext("Port") .. ";" ..
|
"field[2.85,5.25;1.25,0.5;te_serverport;" .. fgettext("Port") .. ";" ..
|
||||||
core.formspec_escape(core.settings:get("port")) .. "]"
|
core.formspec_escape(core.settings:get("port")) .. "]"
|
||||||
else
|
else
|
||||||
retval = retval ..
|
retval = retval ..
|
||||||
"field[0.55,5.2;3.5,0.5;te_serverport;" .. fgettext("Server Port") .. ";" ..
|
"field[0.3,5.25;3.8,0.5;te_serverport;" .. fgettext("Server Port") .. ";" ..
|
||||||
core.formspec_escape(core.settings:get("port")) .. "]"
|
core.formspec_escape(core.settings:get("port")) .. "]"
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
retval = retval ..
|
retval = retval ..
|
||||||
"button[8.5,4.8;3.2,1;play;".. fgettext("Play Game") .. "]"
|
"button[7.9,4.75;4.1,1;play;" .. fgettext("Play Game") .. "]"
|
||||||
end
|
end
|
||||||
|
|
||||||
return retval
|
return retval
|
||||||
|
Loading…
Reference in New Issue
Block a user