diff options
author | glx <glx@openttd.org> | 2008-10-25 19:59:11 +0000 |
---|---|---|
committer | glx <glx@openttd.org> | 2008-10-25 19:59:11 +0000 |
commit | a6bfd7f15bf3fbc1719d736ad06966fa42f171f1 (patch) | |
tree | 774bbab77be99292d9d65e15096b409e4bb814b4 /src/querystring_gui.h | |
parent | 7df85e8a455b27929bad00e7d6e289cc50ba6e18 (diff) | |
download | openttd-a6bfd7f15bf3fbc1719d736ad06966fa42f171f1.tar.xz |
(svn r14534) -Codechange [FS#2382]: Enumify magic return values of HandleEditBox function (Zuu)
Diffstat (limited to 'src/querystring_gui.h')
-rw-r--r-- | src/querystring_gui.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/querystring_gui.h b/src/querystring_gui.h index 9c033200f..8946abd25 100644 --- a/src/querystring_gui.h +++ b/src/querystring_gui.h @@ -9,6 +9,16 @@ #include "window_gui.h" /** + * Return values for HandleEditBoxKey + */ +enum HandleEditBoxResult +{ + HEBR_EDITING = 0, // Other key pressed. + HEBR_CONFIRM, // Return or enter key pressed. + HEBR_CANCEL, // Escape key pressed. +}; + +/** * Data stored about a string that can be modified in the GUI */ struct QueryString { @@ -35,7 +45,7 @@ struct QueryString { void DrawEditBox(Window *w, int wid); void HandleEditBox(Window *w, int wid); - int HandleEditBoxKey(Window *w, int wid, uint16 key, uint16 keycode, Window::EventState &state); + HandleEditBoxResult HandleEditBoxKey(Window *w, int wid, uint16 key, uint16 keycode, Window::EventState &state); }; struct QueryStringBaseWindow : public Window, public QueryString { |