ES-DE CONFIGURATIONS: mimickiing what was done for Utilities menu

This commit is contained in:
XargonWan 2024-08-05 21:36:03 +09:00
parent e85f3e1617
commit cfe5e77b33

View file

@ -60,18 +60,7 @@ GuiMenu::GuiMenu()
addEntry("RETRODECK CONFIGURATOR", mMenuColorPrimary, false, [this] { openRetroDeckConfigurator(); }); addEntry("RETRODECK CONFIGURATOR", mMenuColorPrimary, false, [this] { openRetroDeckConfigurator(); });
if (isFullUI) if (isFullUI)
addEntry("ES-DE CONFIGURATIONS", mMenuColorPrimary, true, [this] addEntry("ES-DE CONFIGURATIONS", mMenuColorPrimary, true, [this] { openESDEConfiguration(); });
{
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);
});
}
if (isFullUI) if (isFullUI)
addEntry("UTILITIES", mMenuColorPrimary, true, [this] { openUtilities(); }); addEntry("UTILITIES", mMenuColorPrimary, true, [this] { openUtilities(); });
@ -2032,6 +2021,62 @@ void GuiMenu::openUtilities()
mWindow->pushGui(s); 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() void GuiMenu::openQuitMenu()
{ {
#if defined(__APPLE__) || defined(__ANDROID__) #if defined(__APPLE__) || defined(__ANDROID__)