-
Notifications
You must be signed in to change notification settings - Fork 4
SBButton
Nikita Yudin edited this page Feb 13, 2024
·
2 revisions
Inherits: SBBaseButton
Inherited By: SBSpinButton, SBSliderButton, SBLinkButton, SBCheckboxButton, SBCheckButton, SBCustomButton
Base class for spin buttons.
Contains all properties to control the base elements.
Let's look on list of all available properties:
Name | Type | Default | Description |
---|---|---|---|
title | String | "" |
The button's text that will be displayed inside the title button's area. |
description | String | "" |
Description of the button. |
description_visibility | Visibility | true |
Visibility of the description. |
left_icon | Texture2D | Left icon of the button. | |
left_icon_visibility | Visibility | Visibility.NEVER |
Visibility of the left icon. |
left_icon_focus_mode | int | Control.FOCUS_NONE |
Focus mode for left icon. |
left_icon_mouse_filter | int | Control.MOUSE_FILTER_PASS |
Mouse filter for left icon. |
right_icon | Texture2D | Right icon of the button. | |
right_icon_visibility | Visibility | Visibility.NEVER |
Visibility of the right icon. |
right_icon_focus_mode | int | Control.FOCUS_NONE |
Focus mode for right icon. |
right_icon_mouse_filter | int | Control.MOUSE_FILTER_PASS |
Mouse filter for right icon. |
title_block_visibility | Visibility | Visibility.ALWAYS |
Visibility of the title block. |
title_alignment | int | Control.SIZE_SHRINK_BEGIN |
Alignment of the title. |
title_mouse_filter | int | Control.MOUSE_FILTER_PASS |
Mouse filter for title. |
title_stretch_ratio | float | 1.0 |
Stretch ratio of the title. |
description_alignment | int | Control.SIZE_SHRINK_BEGIN |
Alignment of the description. |
content_block_visibility | Visibility | Visibility.ALWAYS |
Visibility of the content block. |
content_mouse_filter | int | Control.MOUSE_FILTER_PASS |
Mouse filter for content. |
content_stretch_ratio | float | 1.0 |
Stretch ratio of the content. |
content_button_flat | bool | true |
If true , the content button is flat. |
value_focus_mode | int | Control.FOCUS_NONE |
Focus mode for value. |
value_mouse_filter | int | Control.MOUSE_FILTER_IGNORE |
Mouse filter for value. |
value_button_flat | bool | true |
If true , the value button is flat. |
title_button_theme | Theme | Theme for the title button. | |
content_theme | Theme | Theme for the content. | |
value_theme | Theme | Theme for the value. | |
left_icon_theme | Theme | Theme for the left icon. | |
right_icon_theme | Theme | Theme for the right icon. |
After we initialize we have its initialized instance in variable with helpful methods:
Name | Return | Description |
---|---|---|
set_title(value: String) | void | Sets the title of the button. |
get_title() | String | Gets the title of the button. |
set_desc(value: String) | void | Sets the description of the button. |
get_desc() | String | Gets the description of the button. |
SpinButton comes with some theme properties that you apply for styling.
See Theme Module
enum Visibility:
Name | Value | Description |
---|---|---|
NEVER | 0 |
Never show the control. Used method member hide . |
ALWAYS | 1 |
Always show the control. Used method member show . |
CLICK | 2 |
Show the control only when the button is clicked. |
HOVER | 3 |
Show the control only when the button is hovered. |
FOCUS | 4 |
Show the control only when the button is focused. |
Site yudinikita.ru · Email mail@yudinikita.ru · GitHub @yudinikita