From 9e43f84427b7a79bd56d56b46fbd341e1a161cfb Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Tue, 4 Feb 2020 09:40:59 +0100 Subject: work --- src/ui.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/ui.c') diff --git a/src/ui.c b/src/ui.c index 983f51c..d8d3a16 100644 --- a/src/ui.c +++ b/src/ui.c @@ -88,6 +88,11 @@ inline scroll_state ui_create_scroll(s32 scroll) void ui_set_textbox_text(textbox_state *textbox, char *text) { + if (global_ui_context.current_active_textbox == textbox) + { + keyboard_set_input_text(global_ui_context.keyboard, text); + } + string_copyn(textbox->buffer, text, textbox->max_len); } @@ -522,7 +527,7 @@ static void ui_set_active_textbox(textbox_state *state) global_ui_context.current_active_textbox = state; } -void set_active_textbox(textbox_state *textbox) +void ui_set_textbox_active(textbox_state *textbox) { ui_set_active_textbox(textbox); keyboard_set_input_text(global_ui_context.keyboard, textbox->buffer); -- cgit v1.2.3-70-g09d2