WidgetGroupBox Class
This class creates a group box.
WidgetGroupBox Class
This class inherits from WidgetMembers
WidgetGroupBox (Gui gui, string title = 0, int space_x = 0, int space_y = 0)
Constructor. Creates a group box with given parameters.Arguments
- Gui gui - GUI, to which the new box will belong.
- string title - Box title. This is an optional parameter.
- int space_x - Horizontal space between the widgets in the box and between them and the box border. This is an optional parameter.
- int space_y - Vertical space between the widgets in the box and between them and the box border. This is an optional parameter.
int getBackground ()
Returns a value indicating if a background texture is rendered for the box.Return value
1 if a background texture is rendered; otherwise, 0.int getBorder ()
Returns a flag indicating if a one-pixel border is rendered around the widget content (in a shape of a box).Return value
1 if a border is rendered; otherwise, 0.vec4 getColor ()
Returns a color of the global color multiplier.Return value
A multiplier color.int getPaddingBottom ()
Returns the current bottom padding for the widget content.Return value
Bottom padding in pixels.int getPaddingLeft ()
Returns the current left-side padding for the widget content.Return value
Left-side padding in pixels.int getPaddingRight ()
Returns the current right-side padding for the widget content.Return value
Right-side padding in pixels.int getPaddingTop ()
Returns the current top padding for the widget content.Return value
Top padding in pixels.int getSpaceX ()
Returns the horizontal space between the widgets in the box and between them and the box border.Return value
Horizontal space.int getSpaceY ()
Returns the vertical space between the widgets in the box and between them and the box border.Return value
Vertical space.int getStencil ()
Returns a value indicating if a widget cuts off its children along its set bounds. Everything that lies outside of them, is not rendered. This option works only if children have GUI_ALIGN_OVERLAP flag set (otherwise, they will expand the box widget bounds and no cutting will be done).Return value
1 if cutting is enabled; otherwise, 0.string getText ()
Returns the box title.Return value
Box title.void setBackground (int mode)
Sets a value indicating if a background texture should be rendered for the box.Arguments
- int mode - 1 to render a background texture, 0 not to render.
void setBorder (int border)
Sets a flag indicating if a one-pixel border is rendered around the widget content (in a shape of a box). By default, the border is always rendered.Arguments
- int border - 1 to use a border around the content; 0 not to use a border.
void setColor (vec4 color)
Sets a color for the global color multiplier. The default is equivalent to vec4(1,1,1,1) (white).Arguments
- vec4 color - Color multiplier.
void setPadding (int left, int right, int top, int bottom)
Sets widget paddings for all sides. Padding clears an area around the content of a widget (inside of it).Arguments
- int left - Left-side padding in pixels.
- int right - Right-side padding in pixels.
- int top - Top padding in pixels.
- int bottom - Bottom padding in pixels.
void setSpace (int space_x, int space_y)
Sets a space between the widgets in the box and between them and the box border.Arguments
- int space_x - Horizontal space.
- int space_y - Vertical space.
void setStencil (int stencil)
Sets a value indicating if a widget cuts off its children along its bounds. Everything that lies outside of them, is not rendered.Arguments
- int stencil - 1 to enable cutting; otherwise, 0.
void setText (string title)
Sets a box title.Arguments
- string title - Box title.
Last update: 03.07.2017
Помогите сделать статью лучше
Была ли эта статья полезной?
(или выберите слово/фразу и нажмите Ctrl+Enter