(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 31fcb98a3e
commit 48a047d73b
5 changed files with 32 additions and 18 deletions

View File

@@ -8,6 +8,16 @@
#include "textbuf_gui.h"
#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
*/
@@ -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 {