diff options
author | rubidium <rubidium@openttd.org> | 2008-05-17 23:11:06 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-05-17 23:11:06 +0000 |
commit | f5681547efc060ab0cc47c36316c4f2aa1217948 (patch) | |
tree | cdbaf12f7c5a7666ecc23983c51dca268e3b58e2 /src/signs_gui.cpp | |
parent | c1713c9ab7438386dbda32b4c33e95995882f702 (diff) | |
download | openttd-f5681547efc060ab0cc47c36316c4f2aa1217948.tar.xz |
(svn r13151) -Codechange: use an enum instead of bool as return type of OnKeyPress/OnCTRLStateChange to make it obvious what the return values mean.
Diffstat (limited to 'src/signs_gui.cpp')
-rw-r--r-- | src/signs_gui.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp index 63fb571b1..15568528a 100644 --- a/src/signs_gui.cpp +++ b/src/signs_gui.cpp @@ -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() |