(svn r14534) -Codechange [FS#2382]: Enumify magic return values of HandleEditBox function (Zuu)

This commit is contained in:
glx
2008-10-25 19:59:11 +00:00
parent 7df85e8a45
commit a6bfd7f15b
5 changed files with 32 additions and 18 deletions

View File

@@ -309,11 +309,13 @@ struct SignWindow : QueryStringBaseWindow, SignList {
{
EventState state = ES_NOT_HANDLED;
switch (this->HandleEditBoxKey(QUERY_EDIT_SIGN_WIDGET_TEXT, key, keycode, state)) {
case 1: // Enter pressed, confirms change
default: break;
case HEBR_CONFIRM:
if (RenameSign(this->cur_sign, this->text.buf)) break;
/* FALL THROUGH */
case 2: // ESC pressed, closes window, abandons changes
case HEBR_CANCEL: // close window, abandon changes
delete this;
break;
}