Skip to content

Commit

Permalink
ES-DE CONFIGURATIONS: mimickiing what was done for Utilities menu
Browse files Browse the repository at this point in the history
  • Loading branch information
XargonWan committed Aug 5, 2024
1 parent e85f3e1 commit cfe5e77
Showing 1 changed file with 57 additions and 12 deletions.
69 changes: 57 additions & 12 deletions es-app/src/guis/GuiMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(); });
Expand Down Expand Up @@ -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<TextComponent>("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<TextComponent>("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<TextComponent>("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<TextComponent>("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__)
Expand Down

0 comments on commit cfe5e77

Please sign in to comment.