Skip to content

Commit

Permalink
Allow up/down buttons to control the game
Browse files Browse the repository at this point in the history
  • Loading branch information
jacgoudsmit committed Aug 30, 2013
1 parent 7c5084c commit aaf11ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Hunt_The_Wumpus.ino
Expand Up @@ -235,9 +235,9 @@ void highlight_current_menu() {

//! Check for left and right button clicks and update the menu index as needed.
void handle_menu() {
if (clicked_buttons & BUTTON_LEFT) {
if (clicked_buttons & (BUTTON_LEFT | BUTTON_UP)) {
selected_menu_idx = (selected_menu_idx > 0) ? selected_menu_idx - 1 : 3;
} else if (clicked_buttons & BUTTON_RIGHT) {
} else if (clicked_buttons & (BUTTON_RIGHT | BUTTON_DOWN)) {
selected_menu_idx = (selected_menu_idx < 3) ? selected_menu_idx + 1 : 0;
}
}
Expand Down

0 comments on commit aaf11ca

Please sign in to comment.