diff options
author | alberth <alberth@openttd.org> | 2009-10-10 14:20:38 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-10-10 14:20:38 +0000 |
commit | cfbd5ba59b987e3b8b22be43b2af99e0285a5d11 (patch) | |
tree | 68c738f76a9ee4552a500f46a3ecfb676556fa63 /src/widget_type.h | |
parent | 402d0d05c920f6066d7052f1222d04dad651fcb1 (diff) | |
download | openttd-cfbd5ba59b987e3b8b22be43b2af99e0285a5d11.tar.xz |
(svn r17755) -Codechange: Allow for a zero-size display plane in a NWidgetStacked widget to hide its child widgets.
Diffstat (limited to 'src/widget_type.h')
-rw-r--r-- | src/widget_type.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/widget_type.h b/src/widget_type.h index 27eeb2071..e655a465f 100644 --- a/src/widget_type.h +++ b/src/widget_type.h @@ -376,8 +376,15 @@ protected: NWidgetBase *tail; ///< Pointer to last widget in container. }; +static const int STACKED_SELECTION_ZERO_SIZE = INT_MAX; ///< Display plane value for getting a zero-size widget. + /** Stacked widgets, widgets all occupying the same space in the window. - * @note the semantics difference between #NWID_SELECTION and #NWID_LAYERED is currently not used. + * #NWID_SELECTION allows for selecting one of several panels (planes) to tbe displayed. All planes must have the same size. + * Since all planes are also initialized, switching between different planes can be done while the window is displayed. + * + * There is also a special plane #STACKED_SELECTION_ZERO_SIZE which always has zero size, and is not resizable or fillable. It is used to make all child + * planes of the widget disappear. Unlike the regular display planes, switching from or to the #STACKED_SELECTION_ZERO_SIZE plane means that a + * #Windows::ReInit() is needed to re-initialize the window. */ class NWidgetStacked : public NWidgetContainer { public: |