From a019103ed54330cce76f5d8de803efdeb9c18396 Mon Sep 17 00:00:00 2001 From: ITotalJustice <47043333+ITotalJustice@users.noreply.github.com> Date: Sun, 14 Sep 2025 14:37:00 +0100 Subject: [PATCH] mui: create menus info text from the menus array, rather than hardcoding them. --- sphaira/source/ui/menus/main_menu.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/sphaira/source/ui/menus/main_menu.cpp b/sphaira/source/ui/menus/main_menu.cpp index c6ed5f4..f910a94 100644 --- a/sphaira/source/ui/menus/main_menu.cpp +++ b/sphaira/source/ui/menus/main_menu.cpp @@ -296,18 +296,22 @@ MainMenu::MainMenu() { language_items.push_back("Vietnamese"_i18n); language_items.push_back("Ukrainian"_i18n); + // build menus info. + std::string menus_info = "Launch one of Sphaira's menus:\n"_i18n; + for (auto& e : GetMenuMenuEntries()) { + if (e.name == App::GetApp()->m_left_menu.Get()) { + continue; + } else if (e.name == App::GetApp()->m_right_menu.Get()) { + continue; + } + + menus_info += "- " + i18n::get(e.title) + "\n"; + } + menus_info += "\nYou can change the left/right menu in the Advanced Options."_i18n; + options->Add("Menus"_i18n, [](){ App::DisplayMenuOptions(); - }, "Launch one of Sphaira's menus:\n" - "- Appstore\n" - "- Saves\n" - "- GitHub\n" - "- FTP Install\n" - "- MTP Install\n" - "- USB Install\n" - "- IRS (Infrared Joycon Camera)\n" - "- Web\n\n" - "You can change the left/right menu in the Advanced Options."_i18n); + }, menus_info); options->Add("Network"_i18n, [this](){ auto options = std::make_unique("Network Options"_i18n, Sidebar::Side::LEFT);