Skip to content

Commit

Permalink
Allow use of Return and Keypad Enter to Confirm
Browse files Browse the repository at this point in the history
Add Return and Keypad Enter as hard-coded alternatives to the Confirm
key to make basic menu navigation easier for new players.
  • Loading branch information
gunchleoc authored and Yohann Ferreira committed Oct 19, 2018
1 parent c83ef12 commit 48c121a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/engine/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ void InputEngine::_KeyEventHandler(SDL_KeyboardEvent &key_event)
_right_state = true;
_right_press = true;
return;
} else if(key_event.keysym.sym == _key.confirm) {
} else if(key_event.keysym.sym == _key.confirm || key_event.keysym.sym == SDLK_RETURN || key_event.keysym.sym == SDLK_KP_ENTER) {
_confirm_state = true;
_confirm_press = true;
return;
Expand Down Expand Up @@ -420,7 +420,7 @@ void InputEngine::_KeyEventHandler(SDL_KeyboardEvent &key_event)
_right_state = false;
_right_release = true;
return;
} else if(key_event.keysym.sym == _key.confirm) {
} else if(key_event.keysym.sym == _key.confirm || key_event.keysym.sym == SDLK_RETURN || key_event.keysym.sym == SDLK_KP_ENTER) {
_confirm_state = false;
_confirm_release = true;
return;
Expand Down

0 comments on commit 48c121a

Please sign in to comment.