diff options
author | frosch <frosch@openttd.org> | 2012-11-13 21:46:37 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-11-13 21:46:37 +0000 |
commit | 1071d51508695978adcf9a184e0a26a65fff2705 (patch) | |
tree | db442dc158e26b8f3e439edbe0b4a1b58c0de153 /src/ai | |
parent | 137adb3496a47f79d4e0a15463c756341f8217a9 (diff) | |
download | openttd-1071d51508695978adcf9a184e0a26a65fff2705.tar.xz |
(svn r24727) -Fix: In various windows the OSK looked shiny but using it had no effect whatsoever.
Diffstat (limited to 'src/ai')
-rw-r--r-- | src/ai/ai_gui.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp index a1c0616c2..98feba077 100644 --- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -1342,9 +1342,7 @@ struct AIDebugWindow : public QueryStringBaseWindow { EventState state = ES_NOT_HANDLED; switch (this->HandleEditBoxKey(WID_AID_BREAK_STR_EDIT_BOX, key, keycode, state)) { case HEBR_EDITING: - /* Save the current string to static member so it can be restored next time the window is opened. */ - strecpy(this->break_string, this->edit_str_buf, lastof(this->break_string)); - break_string_filter.SetFilterTerm(this->break_string); + this->OnOSKInput(WID_AID_BREAK_STR_EDIT_BOX); break; case HEBR_CANCEL: @@ -1373,6 +1371,15 @@ struct AIDebugWindow : public QueryStringBaseWindow { return state; } + virtual void OnOSKInput(int wid) + { + if (wid == WID_AID_BREAK_STR_EDIT_BOX) { + /* Save the current string to static member so it can be restored next time the window is opened. */ + strecpy(this->break_string, this->edit_str_buf, lastof(this->break_string)); + break_string_filter.SetFilterTerm(this->break_string); + } + } + /** * Some data on this window has become invalid. * @param data Information about the changed data. |