CheckButton
On/off switch with ToggleMode enabled.
Creates a toggle button with switch visuals and left-aligned text. For an on/off setting use ButtonPressed and Toggled(bool) rather than ButtonDown/ButtonUp. Visuals differ, but Disabled, SetPressedNoSignal and ButtonGroup retain BaseButton semantics.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
CheckButtonConstructor
public CheckButton();Creates a switch with ToggleMode = true and left-aligned text. Uses shared BaseButton rules.
Theme properties
These are Theme resource keys, not C# properties. Use the matching Control GetTheme…() and AddTheme…Override() methods for each value type.
| Key and type | Description |
|---|---|
button_checked_colorColor | The color of the checked icon when the checkbox is pressed. Default:Color(1, 1, 1, 1) |
button_unchecked_colorColor | The color of the unchecked icon when the checkbox is not pressed. Default:Color(1, 1, 1, 1) |
check_v_offsetint | The vertical offset used when rendering the toggle icons (in pixels). Default:0 |
checkedTexture2D | The icon to display when the |
checked_disabledTexture2D | The icon to display when the |
checked_disabled_mirroredTexture2D | The icon to display when the |
checked_mirroredTexture2D | The icon to display when the |
uncheckedTexture2D | The icon to display when the |
unchecked_disabledTexture2D | The icon to display when the |
unchecked_disabled_mirroredTexture2D | The icon to display when the |
unchecked_mirroredTexture2D | The icon to display when the |