From e5c1a7b5c3afcdfd0671b6476055822eba665205 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 3 Jan 2009 13:59:05 +0000 Subject: (svn r14804) -Codechange: unify opening the OSK (Zuu) --- src/window.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/window.cpp') diff --git a/src/window.cpp b/src/window.cpp index 00b81c1d4..bf79b2b88 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -24,6 +24,7 @@ #include "window_func.h" #include "tilehighlight_func.h" #include "network/network.h" +#include "querystring_gui.h" #include "table/sprites.h" @@ -184,6 +185,13 @@ static void DispatchLeftClickEvent(Window *w, int x, int y, bool double_click) } } else if (wi->type == WWT_SCROLLBAR || wi->type == WWT_SCROLL2BAR || wi->type == WWT_HSCROLLBAR) { ScrollbarClickHandler(w, wi, x, y); + } else if (wi->type == WWT_EDITBOX) { + /* Open the OSK window if clicked on an edit box */ + QueryStringBaseWindow *qs = dynamic_cast(w); + if (qs != NULL) { + const int widget_index = wi - w->widget; + qs->OnOpenOSKWindow(widget_index); + } } if (w->desc_flags & WDF_STD_BTN) { -- cgit v1.2.3-54-g00ecf