diff options
Diffstat (limited to 'src/misc_gui.cpp')
-rw-r--r-- | src/misc_gui.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 868c105a9..4d43db770 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -811,10 +811,10 @@ void QueryString::DrawEditBox(const Window *w, int wid) const _cur_dpi = old_dpi; } -HandleEditBoxResult QueryStringBaseWindow::HandleEditBoxKey(int wid, uint16 key, uint16 keycode, EventState &state) +EventState QueryStringBaseWindow::HandleEditBoxKey(int wid, uint16 key, uint16 keycode) { - HandleEditBoxResult result = this->QueryString::HandleEditBoxKey(this, wid, key, keycode, state); - switch (result) { + EventState state = ES_NOT_HANDLED; + switch (this->QueryString::HandleEditBoxKey(this, wid, key, keycode, state)) { case HEBR_EDITING: this->OnOSKInput(wid); break; @@ -835,7 +835,7 @@ HandleEditBoxResult QueryStringBaseWindow::HandleEditBoxKey(int wid, uint16 key, default: break; } - return result; + return state; } /** Class for the string query window. */ @@ -916,13 +916,6 @@ struct QueryStringWindow : public QueryStringBaseWindow } } - virtual EventState OnKeyPress(uint16 key, uint16 keycode) - { - EventState state = ES_NOT_HANDLED; - this->HandleEditBoxKey(WID_QS_TEXT, key, keycode, state); - return state; - } - ~QueryStringWindow() { if (!this->handled && this->parent != NULL) { |