Toggle switch (for Shape Painter)
Toggle switch that users can click or touch.
Authors and contributors to this community extension: VictrisGames.
Add this behavior to a shape painter object.
When the toggle switch is in the left position, the condition
Checked is "false". If it is in the right position, the condition
Checked is true.
A halo appears when the mouse hovers near the toggle switch.
Toggle switch cannot be toggled by users if any of these are true:
- Toggle switch is hidden
- Toggle switch's layer is hidden
- Toggle switch is disabled
Toggle switch can always be changed by an action.
Learn how to install new extensions by following a step-by-step guide.
Use a shape-painter object to draw a toggle switch that users can click or touch.
Thumb color (when checked)
Change the thumb color (when checked).
Active track color
Change the active track color (the part on the thumb left).
Active track opacity
Change the active track opacity.
Check (or uncheck) the toggle switch
Check (or uncheck) the toggle switch.
Disable (or enable) the toggle switch
Disable (or enable) the toggle switch.
Halo opacity (hover)
Change opacity of the halo when the thumb is hovered.
Halo opacity (pressed)
Change the halo opacity when the thumb is pressed.
Change the halo radius.
Thumb color (when unchecked)
Change the thumb color (when unchecked).
Inactive track color
Change the inactive track color (the part on the thumb right).
Inactive track opacity
Change the inactive track opacity.
Change the thumb opacity.
Change the thumb radius.
Thumb shadow offset on X axis
Change the offset on X axis of the thumb shadow.
Thumb shadow offset on Y axis
Change the offset on Y axis of the thumb shadow.
Thumb shadow opacity
Change the thumb shadow opacity.
Change the track height.
Change the track width.
Toggle the switch
If checked, change to unchecked. If unchecked, change to checked.
Check if the toggle switch is checked.
Check if the toggle switch is disabled.
Is mouse hovered over toggle switch?
Check if mouse is hovering over toggle switch.
||Active thumb color.|
||Active track color.|
||Active track opacity.|
||Halo opacity (hover).|
||Halo opacity (pressed).|
||Halo radius (pixels).|
||Inactive thumb color.|
||Inactive track color.|
||Inactive track opacity.|
||Offset (X) of shadow on thumb.|
||Offset (Y) of shadow on thumb.|
||Opacity of shadow on thumb.|
This page is an auto-generated reference page about the Toggle switch (for Shape Painter) extension, made by the community of GDevelop, the open-source, cross-platform game engine designed for everyone. Learn more about all GDevelop community-made extensions here.