(svn r13151) -Codechange: use an enum instead of bool as return type of OnKeyPress/OnCTRLStateChange to make it obvious what the return values mean.

This commit is contained in:
rubidium
2008-05-17 23:11:06 +00:00
parent b101faea20
commit d284ba2283
13 changed files with 85 additions and 81 deletions

View File

@@ -255,10 +255,10 @@ struct SignWindow : QueryStringBaseWindow {
}
}
virtual bool OnKeyPress(uint16 key, uint16 keycode)
virtual EventState OnKeyPress(uint16 key, uint16 keycode)
{
bool cont = true;
switch (this->HandleEditBoxKey(QUERY_EDIT_SIGN_WIDGET_TEXT, key, keycode, cont)) {
EventState state = ES_NOT_HANDLED;
switch (this->HandleEditBoxKey(QUERY_EDIT_SIGN_WIDGET_TEXT, key, keycode, state)) {
case 1: // Enter pressed, confirms change
RenameSign(this->cur_sign, this->text.buf);
/* FALL THROUGH */
@@ -267,7 +267,7 @@ struct SignWindow : QueryStringBaseWindow {
delete this;
break;
}
return cont;
return state;
}
virtual void OnMouseLoop()