Toggle switch
Toggle switch that users can click or touch.
Authors and contributors to this experimental extension: D8H, VictrisGames.
Toggle switch that users can click or touch. The switch can be customized with sprites.
There are ready-to-use toggle switches in the asset-store settings UI pack.
Tip
Learn how to install new extensions by following a step-by-step guide.
Toggle switch
A toggle switch that users can click or touch.
Object actions
De/activate interactions
De/activate interactions with the button.
See parameters
- Parameter 0: 👾 Object
- Parameter 1 (❓ Yes or No): Activate
Technical note: parameter 2 are internal parameters handled by GDevelop.
Check (or uncheck)
Check (or uncheck) the toggle switch.
See parameters
- Parameter 0: 👾 Object
- Parameter 1 (❓ Yes or No): IsChecked
Technical note: parameter 2 are internal parameters handled by GDevelop.
Toggle
Toggle the switch.
See parameters
- Parameter 0: 👾 Object
Technical note: parameter 1 are internal parameters handled by GDevelop.
Object conditions
Has just been checked
Check if the toggle switch was checked in the current frame.
See parameters
- Parameter 0: 👾 Object
Technical note: parameter 1 are internal parameters handled by GDevelop.
Has just been toggled
Check if the toggle switch was checked or unchecked in the current frame.
See parameters
- Parameter 0: 👾 Object
Technical note: parameter 1 are internal parameters handled by GDevelop.
Has just been unchecked
Check if the toggle switch was unchecked in the current frame.
See parameters
- Parameter 0: 👾 Object
Technical note: parameter 1 are internal parameters handled by GDevelop.
Interactions activated
Check if interactions are activated on the button.
See parameters
- Parameter 0: 👾 Object
Technical note: parameter 1 are internal parameters handled by GDevelop.
Is checked
Check if the toggle switch is checked.
See parameters
- Parameter 0: 👾 Object
Technical note: parameter 1 are internal parameters handled by GDevelop.
Is hovered
Check if the cursor is hovered over the button.
See parameters
- Parameter 0: 👾 Object
Technical note: parameter 1 are internal parameters handled by GDevelop.
Is pressed
Check if the button is currently being pressed with mouse or touch.
See parameters
- Parameter 0: 👾 Object
Technical note: parameter 1 are internal parameters handled by GDevelop.
Is held outside
Check if the button is currently being pressed outside with mouse or touch.
See parameters
- Parameter 0: 👾 Object
Technical note: parameter 1 are internal parameters handled by GDevelop.
No expressions for this object.
This page is an auto-generated reference page about the Toggle switch 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.