diff options
author | rubidium <rubidium@openttd.org> | 2009-03-15 15:12:06 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-03-15 15:12:06 +0000 |
commit | f9def73be628b8298eb9164ebdf5d0d77f30b106 (patch) | |
tree | 66a1daaed45d405317364932c5184ead15c023d4 /src/window.cpp | |
parent | e9ae5ae307d3f4064a46175f4f66ca6a372f5578 (diff) | |
download | openttd-f9def73be628b8298eb9164ebdf5d0d77f30b106.tar.xz |
(svn r15723) -Codechange: use a constructor for WindowDescs as that makes expanding them much easier (Alberth)
Diffstat (limited to 'src/window.cpp')
-rw-r--r-- | src/window.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/window.cpp b/src/window.cpp index 23583a312..35abaf5f3 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -52,6 +52,23 @@ bool _scrolling_viewport; byte _special_mouse_mode; +/** Window description constructor. */ +WindowDesc::WindowDesc(int16 left, int16 top, int16 min_width, int16 min_height, int16 def_width, int16 def_height, + WindowClass window_class, WindowClass parent_class, uint32 flags, const Widget *widgets) +{ + this->left = left; + this->top = top; + this->minimum_width = min_width; + this->minimum_height = min_height; + this->default_width = def_width; + this->default_height = def_height; + this->cls = window_class; + this->parent_cls = parent_class; + this->flags = flags; + this->widgets = widgets; +} + + /** * Set the window that has the focus * @param w The window to set the focus on |