Added missing up and down event key to SDL demo
This commit is contained in:
parent
f2b9b9a586
commit
34b12bd402
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user