Commit: bd9b2b697ac73f17919eeefba56136b459a8254e Parent: 0c76e43f51b70e4d717123b8e772e8aa981b7050 Author: Randy Palamar Date: Mon, 29 Jul 2024 20:21:08 -0600 exit input with ENTER Diffstat:
M | colourpicker.c | | | 5 | +++++ |
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/colourpicker.c b/colourpicker.c @@ -388,6 +388,11 @@ do_text_input(ColourPickerCtx *ctx, Rect r, Color colour) ctx->is.buf_len - ctx->is.cursor - 1); ctx->is.buf[--ctx->is.buf_len] = 0; } + + if (IsKeyPressed(KEY_ENTER)) { + parse_and_store_text_input(ctx); + ctx->is.idx = -1; + } } static void