From: Ingo Ruhnke Date: Tue, 19 Aug 2014 00:35:12 +0000 (+0200) Subject: Added switch to turn off developer mode to the OptionMenu X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=1db26006c1a6eb3adca56bc461b28f94dbd22c3e;p=supertux.git Added switch to turn off developer mode to the OptionMenu --- diff --git a/src/supertux/menu/options_menu.cpp b/src/supertux/menu/options_menu.cpp index a3db0eb41..15436877c 100644 --- a/src/supertux/menu/options_menu.cpp +++ b/src/supertux/menu/options_menu.cpp @@ -38,7 +38,8 @@ enum OptionsMenuIDs { MNID_MAGNIFICATION, MNID_ASPECTRATIO, MNID_SOUND, - MNID_MUSIC + MNID_MUSIC, + MNID_DEVELOPER_MODE }; OptionsMenu::OptionsMenu(bool complete) @@ -200,6 +201,12 @@ OptionsMenu::OptionsMenu(bool complete) add_submenu(_("Setup Joystick"), MenuStorage::JOYSTICK_MENU) ->set_help(_("Configure joystick control-action mappings")); + + if (g_config->developer_mode) + { + add_toggle(MNID_DEVELOPER_MODE, _("Developer Mode"), g_config->developer_mode); + } + add_hl(); add_back(_("Back")); } @@ -293,6 +300,11 @@ OptionsMenu::menu_action(MenuItem* item) } break; + case MNID_DEVELOPER_MODE: + g_config->developer_mode = is_toggled(MNID_DEVELOPER_MODE); + log_info << "developer mode: " << g_config->developer_mode << std::endl; + break; + default: break; }