Skip to content

Commit

Permalink
Remove fly mode in simple main menu
Browse files Browse the repository at this point in the history
As the fly mode option is avaiable in-game, this is not used anymore.
  • Loading branch information
srifqi authored and Zeno- committed Apr 26, 2015
1 parent e376441 commit 1c7c349
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions builtin/mainmenu/tab_simple_main.lua
Expand Up @@ -69,20 +69,18 @@ local function get_formspec(tabview, name, tabdata)

-- separator
retval = retval ..
"box[-0.3,3.75;12.4,0.1;#FFFFFF]"
"box[-0.28,3.75;12.4,0.1;#FFFFFF]"

-- checkboxes
retval = retval ..
"checkbox[1.0,3.9;cb_creative;".. fgettext("Creative Mode") .. ";" ..
"checkbox[8.0,3.9;cb_creative;".. fgettext("Creative Mode") .. ";" ..
dump(core.setting_getbool("creative_mode")) .. "]"..
"checkbox[5.0,3.9;cb_damage;".. fgettext("Enable Damage") .. ";" ..
dump(core.setting_getbool("enable_damage")) .. "]" ..
"checkbox[8,3.9;cb_fly_mode;".. fgettext("Fly mode") .. ";" ..
dump(core.setting_getbool("free_move")) .. "]"
"checkbox[8.0,4.4;cb_damage;".. fgettext("Enable Damage") .. ";" ..
dump(core.setting_getbool("enable_damage")) .. "]"
-- buttons
retval = retval ..
"button[2.0,4.5;6,1.5;btn_start_singleplayer;" .. fgettext("Start Singleplayer") .. "]" ..
"button[8.25,4.5;2.5,1.5;btn_config_sp_world;" .. fgettext("Config mods") .. "]"
"button[0,3.7;8,1.5;btn_start_singleplayer;" .. fgettext("Start Singleplayer") .. "]" ..
"button[0,4.5;8,1.5;btn_config_sp_world;" .. fgettext("Config mods") .. "]"

return retval
end
Expand Down Expand Up @@ -138,11 +136,6 @@ local function main_button_handler(tabview, fields, name, tabdata)
return true
end

if fields["cb_fly_mode"] then
core.setting_set("free_move", fields["cb_fly_mode"])
return true
end

if fields["btn_mp_connect"] ~= nil or
fields["key_enter"] ~= nil then

Expand Down

0 comments on commit 1c7c349

Please sign in to comment.