Mainmenu: improve creative/survival switch

master
MoNTE48 2020-05-20 18:02:16 +02:00
parent 1ddf5795ba
commit 8bb1aaa0fc
7 changed files with 7 additions and 5 deletions

View File

@ -18,8 +18,7 @@
local function get_formspec()
local index = filterlist.get_current_index(menudata.worldlist,
tonumber(core.settings:get("mainmenu_last_selected_world")))
local creative_checkbox = core.settings:get_bool("creative_mode") and
"local_creative_checkbox" or "blank"
local creative_mode = core.settings:get_bool("creative_mode")
local retval =
"image_button[0,4.84;3.31,0.92;" ..
@ -36,10 +35,13 @@ local function get_formspec()
"blank.png") .. ";play;;true;false]" ..
"tooltip[play;".. fgettext("Play Game") .. "]" ..
"image_button[7.33,3.09;3.73,0.86;" ..
"image_button[6.725,3;4.95,0.87;" ..
core.formspec_escape(defaulttexturedir ..
creative_checkbox) ..
".png;cb_creative_mode;;true;false]" ..
"local_creative_" .. tostring(creative_mode) .. ".png") ..
";cb_creative_mode;;true;false;" ..
core.formspec_escape(defaulttexturedir ..
"local_creative_" .. tostring(not creative_mode) .. ".png") ..
"]" ..
"tooltip[cb_creative_mode;".. fgettext("Creative mode") .. "]" ..
"tableoptions[background=#27233F;border=false]" ..

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 B

After

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 571 B

After

Width:  |  Height:  |  Size: 570 B