Skip to content

Commit

Permalink
Allow to enter numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
AMDmi3 committed Dec 16, 2013
1 parent 78b8585 commit a35130e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Input.cpp
Expand Up @@ -94,7 +94,8 @@ void Input::Update()
case SDL_KEYDOWN:
// Type a character in text input mode
if (textinput) {
if ((e.key.keysym.sym >= SDLK_a && e.key.keysym.sym <= SDLK_z)
if ((e.key.keysym.sym >= SDLK_a && e.key.keysym.sym <= SDLK_z)
|| (e.key.keysym.sym >= SDLK_0 && e.key.keysym.sym <= SDLK_9)
|| (e.key.keysym.sym == SDLK_SPACE)) {
char ch = (char)e.key.keysym.sym;
ch = shift ? toupper(ch) : ch;
Expand Down

0 comments on commit a35130e

Please sign in to comment.