Slider

Inherits: Range < Control < CanvasItem < Node < Object

Inherited By: HSlider, VSlider

Base class for GUI sliders.

Description

Base class for GUI sliders.

Note: The Range.changed and Range.value_changed signals are part of the Range class which this class inherits from.

Properties

bool

editable

true

FocusMode

focus_mode

2 (overrides Control)

bool

scrollable

true

float

step

1.0 (overrides Range)

int

tick_count

0

bool

ticks_on_borders

false


Signals

drag_ended ( bool value_changed )

Emitted when dragging stops. If value_changed is true, Range.value is different from the value when you started the dragging.


drag_started ( )

Emitted when dragging is started.


Property Descriptions

bool editable = true

  • void set_editable ( bool value )

  • bool is_editable ( )

If true, the slider can be interacted with. If false, the value can be changed only by code.


bool scrollable = true

  • void set_scrollable ( bool value )

  • bool is_scrollable ( )

If true, the value can be changed using the mouse wheel.


int tick_count = 0

  • void set_ticks ( int value )

  • int get_ticks ( )

Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers.


bool ticks_on_borders = false

  • void set_ticks_on_borders ( bool value )

  • bool get_ticks_on_borders ( )

If true, the slider will display ticks for minimum and maximum values.