From ad9c1b0a22fb451f909d8f12510c560fa8889be2 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Mon, 20 Oct 2008 23:43:15 +0000 Subject: fixed text input box bug --- src/game/client/components/menus.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/game/client/components') diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index 311e70cc..7a639429 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -212,7 +212,7 @@ int MENUS::ui_do_edit_box(void *id, const RECT *rect, char *str, int str_size, f if(ui_last_active_item() == id) { int len = strlen(str); - + if (inside && ui_mouse_button(0)) { int mx_rel = (int)(ui_mouse_x() - rect->x); @@ -232,6 +232,7 @@ int MENUS::ui_do_edit_box(void *id, const RECT *rect, char *str, int str_size, f for(int i = 0; i < num_inputevents; i++) { + len = strlen(str); INPUT_EVENT e = inputevents[i]; char c = e.ch; int k = e.key; -- cgit 1.4.1