summaryrefslogtreecommitdiff
path: root/src/querystring_gui.h
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-09-11 18:52:56 +0000
committeralberth <alberth@openttd.org>2009-09-11 18:52:56 +0000
commit669b7d01acb603ebea3071b347f7b0cec8b9f505 (patch)
tree9bd9e851b4f2301fe2a880f229e76a0f63781d77 /src/querystring_gui.h
parent4cb6451507a4ec63a7efc356ee0843f1a952e7b4 (diff)
downloadopenttd-669b7d01acb603ebea3071b347f7b0cec8b9f505.tar.xz
(svn r17502) -Codechange [FS#3184]: Extend QueryStringBaseWindow to support windows with nested widgets (by Terkhen with a few tweaks).
Diffstat (limited to 'src/querystring_gui.h')
-rw-r--r--src/querystring_gui.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/querystring_gui.h b/src/querystring_gui.h
index d77e4b827..c23b4a08c 100644
--- a/src/querystring_gui.h
+++ b/src/querystring_gui.h
@@ -62,6 +62,12 @@ struct QueryStringBaseWindow : public Window, public QueryString {
char *orig_str_buf;
const uint16 edit_str_size; ///< maximum length of string (in bytes), including terminating '\0'
+ QueryStringBaseWindow(uint16 size) : Window(), edit_str_size(size)
+ {
+ assert(size != 0);
+ this->edit_str_buf = CallocT<char>(size);
+ }
+
QueryStringBaseWindow(uint16 size, const WindowDesc *desc, WindowNumber window_number = 0) : Window(desc, window_number), edit_str_size(size)
{
assert(size != 0);