diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-12-15 14:03:49 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-12-15 14:03:49 -0500 |
commit | 6c2963f91b90f73da862ac9feac25cdcc1266869 (patch) | |
tree | e5221f7cbcd6829a188186bd7c731f409c17fa76 /main.c | |
parent | 4ddf0821a9a24f6e6a6ca60ab6d38e095a88591b (diff) |
text insertion working very well!
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -116,8 +116,16 @@ int main(void) { case SDLK_DOWN: buffer_cursor_move_down(&text_buffer); break; + case SDLK_RETURN: + //buffer_insert_text_at_cursor(buffer, U"\n", 1); + break; } } break; + case SDL_TEXTINPUT: { + char *text = event.text.text; + printf("TEXT: %s\n",text); + buffer_insert_utf8_at_cursor(&text_buffer, text); + } break; } } |