aboutsummaryrefslogtreecommitdiff
path: root/lib/lua/src/lgc.h
diff options
context:
space:
mode:
authorLars Mueller <appgurulars@gmx.de>2022-01-28 17:50:51 +0100
committerHugues Ross <hugues.ross@gmail.com>2022-01-31 16:35:30 -0500
commit1e4d6672be35e075de6add3d4d4e97793a911efc (patch)
tree34b10cabc5a6b0d68953060da1000bb4a9953c9a /lib/lua/src/lgc.h
parent80812b86d6097ae67ec61f99357497cbaaf43c80 (diff)
downloadminetest-1e4d6672be35e075de6add3d4d4e97793a911efc.tar.gz
minetest-1e4d6672be35e075de6add3d4d4e97793a911efc.tar.bz2
minetest-1e4d6672be35e075de6add3d4d4e97793a911efc.zip
Fix builtin statbar backgrounds
see #12000
Diffstat (limited to 'lib/lua/src/lgc.h')
0 files changed, 0 insertions, 0 deletions
117' href='#n117'>117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
--Minetest
--Copyright (C) 2014 sapier
--
--This program is free software; you can redistribute it and/or modify
--it under the terms of the GNU Lesser General Public License as published by
--the Free Software Foundation; either version 2.1 of the License, or
--(at your option) any later version.
--
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--GNU Lesser General Public License for more details.
--
--You should have received a copy of the GNU Lesser General Public License along
--with this program; if not, write to the Free Software Foundation, Inc.,
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

--------------------------------------------------------------------------------
local function get_formspec(tabview, name, tabdata)
	
	local index = menudata.worldlist:get_current_index(
				tonumber(core.setting_get("mainmenu_last_selected_world"))
				)

	local retval =
		"button[4,4.15;2.6,0.5;world_delete;" .. fgettext("Delete") .. "]" ..
		"button[6.5,4.15;2.8,0.5;world_create;" .. fgettext("New") .. "]" ..
		"button[9.2,4.15;2.55,0.5;world_configure;" .. fgettext("Configure") .. "]" ..
		"button[8.5,4.95;3.25,0.5;start_server;" .. fgettext("Start Game") .. "]" ..
		"label[4,-0.25;" .. fgettext("Select World:") .. "]" ..
		"checkbox[0.25,0.25;cb_creative_mode;" .. fgettext("Creative Mode") .. ";" ..
		dump(core.setting_getbool("creative_mode")) .. "]" ..
		"checkbox[0.25,0.7;cb_enable_damage;" .. fgettext("Enable Damage") .. ";" ..
		dump(core.setting_getbool("enable_damage")) .. "]" ..
		"checkbox[0.25,1.15;cb_server_announce;" .. fgettext("Public") .. ";" ..
		dump(core.setting_getbool("server_announce")) .. "]" ..
		"label[0.25,2.2;" .. fgettext("Name/Password") .. "]" ..
		"field[0.55,3.2;3.5,0.5;te_playername;;" ..
		core.formspec_escape(core.setting_get("name")) .. "]" ..
		"pwdfield[0.55,4;3.5,0.5;te_passwd;]"

	local bind_addr = core.setting_get("bind_address")
	if bind_addr ~= nil and bind_addr ~= "" then
		retval = retval ..
			"field[0.55,5.2;2.25,0.5;te_serveraddr;" .. fgettext("Bind Address") .. ";" ..
			core.formspec_escape(core.setting_get("bind_address")) .. "]" ..
			"field[2.8,5.2;1.25,0.5;te_serverport;" .. fgettext("Port") .. ";" ..
			core.formspec_escape(core.setting_get("port")) .. "]"
	else
		retval = retval ..
			"field[0.55,5.2;3.5,0.5;te_serverport;" .. fgettext("Server Port") .. ";" ..
			core.formspec_escape(core.setting_get("port")) .. "]"
	end
	
	retval = retval ..
		"textlist[4,0.25;7.5,3.7;srv_worlds;" ..
		menu_render_worldlist() ..
		";" .. index .. "]"
	
	return retval
end