diff options
author | alberth <alberth@openttd.org> | 2009-05-02 16:33:28 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-05-02 16:33:28 +0000 |
commit | 37afd58fdbc904f017770e401c51d7f4516b49a7 (patch) | |
tree | 237c8450cc886bad655e82b6d1e6e00fe0f12d97 /src/widget_type.h | |
parent | eab4fb07c6e3f297fdc1b86b6e722423e87cf926 (diff) | |
download | openttd-37afd58fdbc904f017770e401c51d7f4516b49a7.tar.xz |
(svn r16201) -Codechange: Add NWidgetBase::SetPadding method.
Diffstat (limited to 'src/widget_type.h')
-rw-r--r-- | src/widget_type.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/widget_type.h b/src/widget_type.h index 0128d510d..1e4b657a1 100644 --- a/src/widget_type.h +++ b/src/widget_type.h @@ -157,6 +157,21 @@ public: virtual void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl) = 0; + /** + * Set additional space (padding) around the widget. + * @param top Amount of additional space above the widget. + * @param right Amount of additional space right of the widget. + * @param bottom Amount of additional space below the widget. + * @param left Amount of additional space left of the widget. + */ + inline void SetPadding(uint8 top, uint8 right, uint8 bottom, uint8 left) + { + this->padding_top = top; + this->padding_right = right; + this->padding_bottom = bottom; + this->padding_left = left; + }; + WidgetType type; ///< Type of the widget / nested widget. uint min_x; ///< Minimal horizontal size. uint min_y; ///< Minimal vertical size. |