Skip to content

Commit

Permalink
add b to go back in most menus
Browse files Browse the repository at this point in the history
  • Loading branch information
vayan committed Dec 16, 2023
1 parent 883fad4 commit b7dc178
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,12 @@ bool Menu::handle_start_menu(Game *game)

bool Menu::handle_config_menu(Game *game)
{
if (bn::keypad::b_pressed())
{
switch_screen(MenuScreen::Start, game);
return true;
}

if (bn::keypad::down_pressed())
{
current_selection_index += 1;
Expand Down Expand Up @@ -460,6 +466,12 @@ bool Menu::handle_play_menu(Game *game)
collie_title_anim->update();
}

if (bn::keypad::b_pressed())
{
switch_screen(MenuScreen::Start, game);
return true;
}

if (bn::keypad::down_pressed())
{
current_selection_index += 1;
Expand Down Expand Up @@ -668,7 +680,7 @@ bool Menu::handle_credit_menu(Game *game)
text_sprite.put_above();
}

if (bn::keypad::start_pressed() || bn::keypad::a_pressed())
if (bn::keypad::start_pressed() || bn::keypad::a_pressed() || bn::keypad::b_pressed())
{
text_sprites.clear();
config_sprites.clear();
Expand Down

0 comments on commit b7dc178

Please sign in to comment.