From 6c165a4ca098365d572f03ddab41e3e8123744cd Mon Sep 17 00:00:00 2001 From: SophiaHadash <=> Date: Wed, 7 Jul 2021 14:28:09 +0200 Subject: [PATCH] move option up --- es-app/src/guis/GuiMenu.cpp | 44 ++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index 038ad5c4f..4ceea6a1b 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -948,6 +948,28 @@ void GuiMenu::openOtherOptions() }); #endif + // Exit button configuration. + auto exit_button_config = std::make_shared> + (mWindow, getHelpStyle(), "EXIT BUTTON COMBO", false); + std::string selectedExitButtonCombo = Settings::getInstance()->getString("ExitButtonCombo"); + exit_button_config->add("F4", "F4", selectedExitButtonCombo == "F4"); + exit_button_config->add("Alt + F4", "AltF4", selectedExitButtonCombo == "AltF4"); + #if defined(_WIN64) || defined(__unix__) + exit_button_config->add("Alt + Q", "AltQ", selectedExitButtonCombo == "AltQ"); + #endif + #if defined(__APPLE__) + exit_button_config->add("\u2318 + Q", "CmdQ", selectedExitButtonCombo == "CmdQ"); + #endif + s->addWithLabel("EXIT BUTTON COMBO", exit_button_config); + s->addSaveFunc([exit_button_config, s] { + if (exit_button_config->getSelected() != + Settings::getInstance()->getString("ExitButtonCombo")) { + Settings::getInstance()->setString("ExitButtonCombo", + exit_button_config->getSelected()); + s->setNeedsSaving(); + } + }); + // When to save game metadata. auto save_gamelist_mode = std::make_shared> (mWindow, getHelpStyle(), "WHEN TO SAVE METADATA", false); @@ -1184,28 +1206,6 @@ void GuiMenu::openOtherOptions() } }); - // Exit button configuration. - auto exit_button_config = std::make_shared> - (mWindow, getHelpStyle(), "EXIT BUTTON COMBO", false); - std::string selectedExitButtonCombo = Settings::getInstance()->getString("ExitButtonCombo"); - exit_button_config->add("F4", "F4", selectedExitButtonCombo == "F4"); - exit_button_config->add("Alt + F4", "AltF4", selectedExitButtonCombo == "AltF4"); - #if defined(_WIN64) || defined(__unix__) - exit_button_config->add("Alt + Q", "AltQ", selectedExitButtonCombo == "AltQ"); - #endif - #if defined(__APPLE__) - exit_button_config->add("\u2318 + Q", "CmdQ", selectedExitButtonCombo == "CmdQ"); - #endif - s->addWithLabel("EXIT BUTTON COMBO", exit_button_config); - s->addSaveFunc([exit_button_config, s] { - if (exit_button_config->getSelected() != - Settings::getInstance()->getString("ExitButtonCombo")) { - Settings::getInstance()->setString("ExitButtonCombo", - exit_button_config->getSelected()); - s->setNeedsSaving(); - } - }); - // macOS requires root privileges to reboot and power off so it doesn't make much // sense to enable this setting and menu entry for that operating system. #if !defined(__APPLE__)