Moved games to new game menu (#2544)

* Moved games to new game menu
* There's enough games to have a menu now and I plan to make more. Having them in "Utilities" made no sense.
This commit is contained in:
RocketGod 2025-03-06 13:27:25 -08:00 committed by GitHub
parent ee472e1ed2
commit a17995fd2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 74 additions and 4 deletions

View file

@ -126,6 +126,7 @@ const NavigationView::AppList NavigationView::appList = {
{"microphone", "Microphone", HOME, Color::green(), &bitmap_icon_microphone, new ViewFactory<MicTXView>()},
{"lookingglass", "Looking Glass", HOME, Color::green(), &bitmap_icon_looking, new ViewFactory<GlassView>()},
{nullptr, "Utilities", HOME, Color::cyan(), &bitmap_icon_utilities, new ViewFactory<UtilitiesMenuView>()},
{nullptr, "Games", HOME, Color::purple(), &bitmap_icon_games, new ViewFactory<GamesMenuView>()},
{nullptr, "Settings", HOME, Color::cyan(), &bitmap_icon_setup, new ViewFactory<SettingsMenuView>()},
{nullptr, "Debug", HOME, Color::light_grey(), &bitmap_icon_debug, new ViewFactory<DebugMenuView>()},
/* RX ********************************************************************/
@ -868,6 +869,22 @@ void UtilitiesMenuView::on_populate() {
add_external_items(nav_, app_location_t::UTILITIES, *this, return_icon ? 1 : 0);
}
/* GamesMenuView ********************************************************/
GamesMenuView::GamesMenuView(NavigationView& nav)
: nav_(nav) {
set_max_rows(2);
}
void GamesMenuView::on_populate() {
bool return_icon = pmem::show_gui_return_icon();
if (return_icon) {
add_item({"..", Theme::getInstance()->fg_light->foreground, &bitmap_icon_previous, [this]() { nav_.pop(); }});
}
add_apps(nav_, *this, GAMES);
add_external_items(nav_, app_location_t::GAMES, *this, return_icon ? 1 : 0);
}
/* SystemMenuView ********************************************************/
void SystemMenuView::hackrf_mode(NavigationView& nav) {