Skip to content

Commit a35130e

Browse files
committed
Allow to enter numbers
1 parent 78b8585 commit a35130e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Input.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ void Input::Update()
9494
case SDL_KEYDOWN:
9595
// Type a character in text input mode
9696
if (textinput) {
97-
if ((e.key.keysym.sym >= SDLK_a && e.key.keysym.sym <= SDLK_z)
97+
if ((e.key.keysym.sym >= SDLK_a && e.key.keysym.sym <= SDLK_z)
98+
|| (e.key.keysym.sym >= SDLK_0 && e.key.keysym.sym <= SDLK_9)
9899
|| (e.key.keysym.sym == SDLK_SPACE)) {
99100
char ch = (char)e.key.keysym.sym;
100101
ch = shift ? toupper(ch) : ch;

0 commit comments

Comments
 (0)