summaryrefslogtreecommitdiff
path: root/src/misc_gui.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-05-30 12:06:18 +0000
committeralberth <alberth@openttd.org>2010-05-30 12:06:18 +0000
commit113f3ef0ebafcc637d061e955a162751cf011f8f (patch)
tree97b540ea5d7e931e802972ccbcee537744239343 /src/misc_gui.cpp
parentfc82d9cd77224c458c05ce2fd749e58e9cee5299 (diff)
downloadopenttd-113f3ef0ebafcc637d061e955a162751cf011f8f.tar.xz
(svn r19904) -Codechange: Make EventState usable outside Window context.
Diffstat (limited to 'src/misc_gui.cpp')
-rw-r--r--src/misc_gui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index 4dc79cbba..fa24d574b 100644
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -1158,11 +1158,11 @@ bool QueryString::HasEditBoxFocus(const Window *w, int wid) const
return w->parent->nested_focus != NULL && w->parent->nested_focus->type == WWT_EDITBOX;
}
-HandleEditBoxResult QueryString::HandleEditBoxKey(Window *w, int wid, uint16 key, uint16 keycode, Window::EventState &state)
+HandleEditBoxResult QueryString::HandleEditBoxKey(Window *w, int wid, uint16 key, uint16 keycode, EventState &state)
{
if (!QueryString::HasEditBoxFocus(w, wid)) return HEBR_NOT_FOCUSED;
- state = Window::ES_HANDLED;
+ state = ES_HANDLED;
switch (keycode) {
case WKC_ESC: return HEBR_CANCEL;
@@ -1196,7 +1196,7 @@ HandleEditBoxResult QueryString::HandleEditBoxKey(Window *w, int wid, uint16 key
if (IsValidChar(key, this->afilter)) {
if (InsertTextBufferChar(&this->text, key)) w->SetWidgetDirty(wid);
} else {
- state = Window::ES_NOT_HANDLED;
+ state = ES_NOT_HANDLED;
}
}