summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-12-15 14:03:49 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-12-15 14:03:49 -0500
commit6c2963f91b90f73da862ac9feac25cdcc1266869 (patch)
treee5221f7cbcd6829a188186bd7c731f409c17fa76 /main.c
parent4ddf0821a9a24f6e6a6ca60ab6d38e095a88591b (diff)
text insertion working very well!
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/main.c b/main.c
index ac5fcc4..6d9e046 100644
--- a/main.c
+++ b/main.c
@@ -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;
}
}