Added missing up and down event key to SDL demo

This commit is contained in:
vurtun 2016-11-14 19:06:10 +01:00
parent f2b9b9a586
commit 34b12bd402
2 changed files with 8 additions and 0 deletions

View File

@ -284,6 +284,10 @@ nk_sdl_handle_event(SDL_Event *evt)
nk_input_key(ctx, NK_KEY_TEXT_LINE_START, down && state[SDL_SCANCODE_LCTRL]);
else if (sym == SDLK_e)
nk_input_key(ctx, NK_KEY_TEXT_LINE_END, down && state[SDL_SCANCODE_LCTRL]);
else if (sym == SDLK_UP)
nk_input_key(ctx, NK_KEY_UP, down);
else if (sym == SDLK_DOWN)
nk_input_key(ctx, NK_KEY_DOWN, down);
else if (sym == SDLK_LEFT) {
if (state[SDL_SCANCODE_LCTRL])
nk_input_key(ctx, NK_KEY_TEXT_WORD_LEFT, down);

View File

@ -382,6 +382,10 @@ nk_sdl_handle_event(SDL_Event *evt)
nk_input_key(ctx, NK_KEY_TEXT_LINE_START, down && state[SDL_SCANCODE_LCTRL]);
else if (sym == SDLK_e)
nk_input_key(ctx, NK_KEY_TEXT_LINE_END, down && state[SDL_SCANCODE_LCTRL]);
else if (sym == SDLK_UP)
nk_input_key(ctx, NK_KEY_UP, down);
else if (sym == SDLK_DOWN)
nk_input_key(ctx, NK_KEY_DOWN, down);
else if (sym == SDLK_LEFT) {
if (state[SDL_SCANCODE_LCTRL])
nk_input_key(ctx, NK_KEY_TEXT_WORD_LEFT, down);