1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-31 02:19:09 +00:00

(svn r14804) -Codechange: unify opening the OSK (Zuu)

This commit is contained in:
rubidium
2009-01-03 13:59:05 +00:00
parent 0d54db5f9f
commit e5c1a7b5c3
8 changed files with 35 additions and 33 deletions

View File

@@ -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<QueryStringBaseWindow*>(w);
if (qs != NULL) {
const int widget_index = wi - w->widget;
qs->OnOpenOSKWindow(widget_index);
}
}
if (w->desc_flags & WDF_STD_BTN) {