Skip to content

SBCheckboxButton

Nikita Yudin edited this page Feb 13, 2024 · 2 revisions

SBCheckboxButton icon SBCheckboxButton

Inherits: SBButton

A button that represents a binary choice.

Description

CheckBox allows the user to choose one of only two possible options. It's similar to CheckButton in functionality, but it has a different appearance.

Properties

Let's look on list of all available properties:

Name Type Default Description
checked bool false If true, the Checkbox is checked.
value_text String "" The button's text that will be displayed inside the value button's area.
checked_icon Texture2D The icon to display when the CheckboxSpinButton is checked.
unchecked_icon Texture2D false The icon to display when the CheckboxSpinButton is unchecked.
checked_icon_alignment int HORIZONTAL_ALIGNMENT_RIGHT Alignment of the checked icon.

Methods

After we initialize we have its initialized instance in variable with helpful methods:

Name Return Description
set_checked(value: bool) void Sets the checked state.
get_checked() bool Returns the checked state.

Theme Properties

SpinButton comes with some theme properties that you apply for styling.

See Theme Module


Signals

Name Description
changed(value: float) Emitted when the CheckboxSpinButton is checked or unchecked.