(svn r24732) -Codechange: Unify handling of OK and CANCEL actions for editboxes.

This commit is contained in:
frosch
2012-11-13 21:46:58 +00:00
parent fd55399167
commit 7699a7dc06
10 changed files with 65 additions and 101 deletions

View File

@@ -1104,9 +1104,7 @@ public:
virtual EventState OnKeyPress(uint16 key, uint16 keycode)
{
EventState state = ES_NOT_HANDLED;
if (this->HandleEditBoxKey(WID_TF_TOWN_NAME_EDITBOX, key, keycode, state) == HEBR_CANCEL) {
this->UnfocusFocusedWidget();
}
this->HandleEditBoxKey(WID_TF_TOWN_NAME_EDITBOX, key, keycode, state);
return state;
}