Toggle switch
Toggle switch that users can click or touch.
Authors and contributors to this community 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.
Flip the object horizontally
Flip the object horizontally
Flip the object vertically
Flip the object vertically
Height
Change the height of an object.
Scale
Modify the scale of the specified object.
Check (or uncheck)
Check (or uncheck) the toggle switch.
Opacity
Change the opacity of an object, between 0 (fully transparent) to 255 (opaque).
Scale on X axis
Change the width's scale of an object.
Scale on Y axis
Change the height's scale of an object.
Width
Change the width of an object.
Object conditions
Horizontally flipped
Check if the object is horizontally flipped
Vertically flipped
Check if the object is vertically flipped
Has just been checked
Check if the toggle switch was checked in the current frame.
Has just been unchecked
Check if the toggle switch was unchecked in the current frame.
Interactions activated
Check if interactions are activated on the button.
Is checked
Check if the toggle switch is checked.
Is hovered
Check if the cursor is hovered over the button.
Opacity
Compare the opacity of an object, between 0 (fully transparent) to 255 (opaque).
Scale on X axis
Compare the width's scale of an object.
Scale on Y axis
Compare the height's scale of an object.
Object expressions
Expression | Description | |
---|---|---|
Object.Opacity() |
Return the opacity of an object, between 0 (fully transparent) to 255 (opaque). | |
Object.ScaleX() |
Return the width's scale of an object. | |
Object.ScaleY() |
Return the height's scale of an 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.