(svn r24727) -Fix: In various windows the OSK looked shiny but using it had no effect whatsoever.

This commit is contained in:
frosch
2012-11-13 21:46:37 +00:00
parent e0f59fb049
commit 6616b70654
3 changed files with 43 additions and 16 deletions

View File

@@ -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.