mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-01 19:16:29 -04:00
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:
parent
ee472e1ed2
commit
a17995fd2b
8 changed files with 74 additions and 4 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue