diff options
author | smatz <smatz@openttd.org> | 2008-09-15 16:29:40 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-09-15 16:29:40 +0000 |
commit | 606f4defdca281a3f918c9525dbd4d525ad11131 (patch) | |
tree | 460dfbcf75a0eba53ff1d436c6670f771aeeb3fd /src/textbuf_gui.h | |
parent | ff89c704fa40362b7c3f958bade4b8380182a54b (diff) | |
download | openttd-606f4defdca281a3f918c9525dbd4d525ad11131.tar.xz |
(svn r14331) -Codechange: use an enum as additional parameter for ShowQueryString()
Diffstat (limited to 'src/textbuf_gui.h')
-rw-r--r-- | src/textbuf_gui.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/textbuf_gui.h b/src/textbuf_gui.h index 4e61df659..422d26469 100644 --- a/src/textbuf_gui.h +++ b/src/textbuf_gui.h @@ -8,6 +8,7 @@ #include "window_type.h" #include "string_type.h" #include "strings_type.h" +#include "core/enum_type.hpp" struct Textbuf { char *buf; ///< buffer in which text is saved @@ -28,9 +29,18 @@ bool MoveTextBufferPos(Textbuf *tb, int navmode); void InitializeTextBuffer(Textbuf *tb, const char *buf, uint16 maxlength, uint16 maxwidth); void UpdateTextBufferSize(Textbuf *tb); +/** Flags used in ShowQueryString() call */ +enum QueryStringFlags { + QSF_NONE = 0, + QSF_ACCEPT_UNCHANGED = 0x01, ///< return success even when the text didn't change +}; + +DECLARE_ENUM_AS_BIT_SET(QueryStringFlags) + + typedef void QueryCallbackProc(Window*, bool); -void ShowQueryString(StringID str, StringID caption, uint maxlen, uint maxwidth, Window *parent, CharSetFilter afilter); +void ShowQueryString(StringID str, StringID caption, uint maxlen, uint maxwidth, Window *parent, CharSetFilter afilter, QueryStringFlags flags); void ShowQuery(StringID caption, StringID message, Window *w, QueryCallbackProc *callback); /** The number of 'characters' on the on-screen keyboard. */ |