summaryrefslogtreecommitdiff
path: root/src/ui.c
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrik.ramaekers@protonmail.com>2020-02-05 10:29:14 +0100
committerAldrik Ramaekers <aldrik.ramaekers@protonmail.com>2020-02-05 10:29:14 +0100
commitec901c42d7d5dee13b4c69e4b65fc385d8ffd3a8 (patch)
tree2ce3764c5e3d0c1a8a60ea02489ff3e6d94afb23 /src/ui.c
parent3f1aed9d71d10f5a7430b8720c6a1e93630b4477 (diff)
temp commit
Diffstat (limited to 'src/ui.c')
-rw-r--r--src/ui.c7
1 files changed, 6 insertions, 1 deletions
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);