diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index 19baad7f9..d6f80af8b 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -60,18 +60,7 @@ GuiMenu::GuiMenu() addEntry("RETRODECK CONFIGURATOR", mMenuColorPrimary, false, [this] { openRetroDeckConfigurator(); }); if (isFullUI) - addEntry("ES-DE CONFIGURATIONS", mMenuColorPrimary, true, [this] - { - auto configMenu = new GuiMenu(mWindow); - - configMenu->addEntry("UI SETTINGS", mMenuColorPrimary, true, [this] { openUIOptions(); }); - configMenu->addEntry("SOUND SETTINGS", mMenuColorPrimary, true, [this] { openSoundOptions(); }); - configMenu->addEntry("INPUT DEVICE SETTINGS", mMenuColorPrimary, true, [this] { openInputDeviceOptions(); }); - configMenu->addEntry("OTHER SETTINGS", mMenuColorPrimary, true, [this] { openOtherOptions(); }); - - mWindow->pushGui(configMenu); - }); - } + addEntry("ES-DE CONFIGURATIONS", mMenuColorPrimary, true, [this] { openESDEConfiguration(); }); if (isFullUI) addEntry("UTILITIES", mMenuColorPrimary, true, [this] { openUtilities(); }); @@ -2032,6 +2021,62 @@ void GuiMenu::openUtilities() mWindow->pushGui(s); } +void GuiMenu::openESDEConfiguration() { + // Create a new GuiSettings instance for the ES-DE Configurations menu + auto configMenu = new GuiSettings("ES-DE CONFIGURATIONS"); + + HelpStyle style{getHelpStyle()}; + + // UI SETTINGS + ComponentListRow row; + row.addElement(std::make_shared("UI SETTINGS", + Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary), + true); + row.addElement(mMenu.makeArrow(), false); + row.makeAcceptInputHandler([this] { + openUIOptions(); + }); + configMenu->addRow(row); + + // SOUND SETTINGS + row.elements.clear(); + row.addElement(std::make_shared("SOUND SETTINGS", + Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary), + true); + row.addElement(mMenu.makeArrow(), false); + row.makeAcceptInputHandler([this] { + openSoundOptions(); + }); + configMenu->addRow(row); + + // INPUT DEVICE SETTINGS + row.elements.clear(); + row.addElement(std::make_shared("INPUT DEVICE SETTINGS", + Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary), + true); + row.addElement(mMenu.makeArrow(), false); + row.makeAcceptInputHandler([this] { + openInputDeviceOptions(); + }); + configMenu->addRow(row); + + // OTHER SETTINGS + row.elements.clear(); + row.addElement(std::make_shared("OTHER SETTINGS", + Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary), + true); + row.addElement(mMenu.makeArrow(), false); + row.makeAcceptInputHandler([this] { + openOtherOptions(); + }); + configMenu->addRow(row); + + // Set the size and push the menu onto the GUI stack + configMenu->setSize(mSize); + mWindow->pushGui(configMenu); +} + + void GuiMenu::openQuitMenu() { #if defined(__APPLE__) || defined(__ANDROID__)