Skip to content

Slider

A draggable slider that users can move to select a numerical value.

Authors and contributors to this experimental extension: D8H, VictrisGames.


A draggable slider that users can move to select a numerical value. The slider can be customized with sprites.

There are ready-to-use sliders in the asset-store settings UI pack.

Read more...

Tip

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

Slider

Let users select a numerical value by dragging a slider.

Object properties

  • Show the label when the value is changed (🔘 Boolean). Default value is true.
  • Label margin (🔢 Number, Distance). Default value is 8.
  • Minimum value (🔢 Number, Dimensionless). Default value is 0.
  • Maximum value (🔢 Number, Dimensionless). Default value is 100.
  • Step size (🔢 Number, Dimensionless). Default value is 1.
  • Initial value (🔢 Number, Dimensionless). Default value is 50.
See internal technical details
  • Show the label when the value is changed is stored as ShowLabelAtChanges (Boolean). Default value is true.
  • Label margin is stored as LabelMargin (Number). Unit is Pixel. Default value is 8.
  • Minimum value is stored as MinValue (Number). Unit is Dimensionless. Default value is 0.
  • Maximum value is stored as MaxValue (Number). Unit is Dimensionless. Default value is 100.
  • Step size is stored as StepSize (Number). Unit is Dimensionless. Default value is 1.
  • Initial value is stored as InitialValue (Number). Unit is Dimensionless. Default value is 50.

Object actions

De/activate interactions
De/activate interactions with the button.

See parameters & details
  • Parameter 0: 👾 Object
  • Parameter 1 (❓ Yes or No): Activate

Technical note: parameter 2 is an internal parameter handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is PanelSpriteSlider::PanelSpriteSlider::Activate.

Show label
Show (or hide) the label on the bar.

See parameters & details
  • Parameter 0: 👾 Object
  • Parameter 1 (❓ Yes or No): Show the label

Technical note: parameter 2 is an internal parameter handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is PanelSpriteSlider::PanelSpriteSlider::SetLabelShown.

Maximum value
Change the maximum value of the slider.

See parameters & details
  • Parameter 0: 👾 Object
  • Parameter 1: 🟰 Operator
  • Parameter 2 (🔢 Number): Value

Technical note: parameter 3 is an internal parameter handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is PanelSpriteSlider::PanelSpriteSlider::SetMaxValue.

Minimum value
Change the minimum value of the slider.

See parameters & details
  • Parameter 0: 👾 Object
  • Parameter 1: 🟰 Operator
  • Parameter 2 (🔢 Number): Value

Technical note: parameter 3 is an internal parameter handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is PanelSpriteSlider::PanelSpriteSlider::SetMinValue.

Step size
Change the step size of the slider.

See parameters & details
  • Parameter 0: 👾 Object
  • Parameter 1: 🟰 Operator
  • Parameter 2 (🔢 Number): Value

Technical note: parameter 3 is an internal parameter handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is PanelSpriteSlider::PanelSpriteSlider::SetStepSize.

Value
Change the value of the slider.

See parameters & details
  • Parameter 0: 👾 Object
  • Parameter 1: 🟰 Operator
  • Parameter 2 (🔢 Number): Value

Technical note: parameter 3 is an internal parameter handled by GDevelop.

Technical note: this action internal type (in GDevelop JSON) is PanelSpriteSlider::PanelSpriteSlider::SetValue.

Object conditions

Interactions activated
Check if the slider allows interactions.

See parameters & details
  • Parameter 0: 👾 Object

Technical note: parameter 1 is an internal parameter handled by GDevelop.

Technical note: this condition internal type (in GDevelop JSON) is PanelSpriteSlider::PanelSpriteSlider::IsActivated.

Being dragged
Check if the slider is being dragged.

See parameters & details
  • Parameter 0: 👾 Object

Technical note: parameter 1 is an internal parameter handled by GDevelop.

Technical note: this condition internal type (in GDevelop JSON) is PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged.

Label is shown
Check if the label is shown.

See parameters & details
  • Parameter 0: 👾 Object

Technical note: parameter 1 is an internal parameter handled by GDevelop.

Technical note: this condition internal type (in GDevelop JSON) is PanelSpriteSlider::PanelSpriteSlider::IsLabelShown.

Maximum value
Compare the maximum value of the slider.

See parameters & details
  • Parameter 0: 👾 Object
  • Parameter 1: 🟰 Relational operator
  • Parameter 2 (🔢 Number): Value to compare

Technical note: parameter 3 is an internal parameter handled by GDevelop.

Technical note: this condition internal type (in GDevelop JSON) is PanelSpriteSlider::PanelSpriteSlider::MaxValue.

Minimum value
Compare the minimum value of the slider.

See parameters & details
  • Parameter 0: 👾 Object
  • Parameter 1: 🟰 Relational operator
  • Parameter 2 (🔢 Number): Value to compare

Technical note: parameter 3 is an internal parameter handled by GDevelop.

Technical note: this condition internal type (in GDevelop JSON) is PanelSpriteSlider::PanelSpriteSlider::MinValue.

Step size
Compare the step size of the slider.

See parameters & details
  • Parameter 0: 👾 Object
  • Parameter 1: 🟰 Relational operator
  • Parameter 2 (🔢 Number): Value to compare

Technical note: parameter 3 is an internal parameter handled by GDevelop.

Technical note: this condition internal type (in GDevelop JSON) is PanelSpriteSlider::PanelSpriteSlider::StepSize.

Value
Compare the value of the slider.

See parameters & details
  • Parameter 0: 👾 Object
  • Parameter 1: 🟰 Relational operator
  • Parameter 2 (🔢 Number): Value to compare

Technical note: parameter 3 is an internal parameter handled by GDevelop.

Technical note: this condition internal type (in GDevelop JSON) is PanelSpriteSlider::PanelSpriteSlider::Value.

Object expressions

Expression Description
Object.MaxValue() Return the maximum value of the slider.
Object.MinValue() Return the minimum value of the slider.
Object.StepSize() Return the step size of the slider.
Object.Value() Return the value of the slider.

This page is an auto-generated reference page about the Slider extension for GDevelop, the open-source, AI-powered, cross-platform game engine designed for everyone. Learn more about all GDevelop extensions here.