Skip to content

Panel sprite button

A button that can be customized.

Authors and contributors to this community extension: D8H.


The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.

There are ready-to-use buttons in the asset-store menu buttons pack.

Read more...

Tip

Learn how to install new extensions by following a step-by-step guide.

Button (panel sprite)

A button that can be customized.

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.

Label text
Change the text of the button label.

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

Interactions activated
Check if interactions are activated on the button.

Is clicked
Check if the button was just clicked.

Is focused
Check if the button is either hovered or pressed but not hovered.

Is hovered
Check if the cursor is hovered over the button.

Is idle
Check if the button is not used.

Is pressed
Check if the button is currently being pressed with mouse or touch.

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.LabelText() Return the label text.
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 Panel sprite button 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.