Slider ​
Inherits: Range < Control < CanvasItem < Node < Object
Inherited By: HSlider, VSlider
Abstract base class for sliders.
Description
Abstract base class for sliders, used to adjust a value by moving a grabber along a horizontal or vertical axis. Sliders are Range-based controls.
Properties
true | ||
focus_mode | 2 (overrides Control) | |
true | ||
step | 1.0 (overrides Range) | |
0 | ||
false |
Theme Properties
0 | ||
0 | ||
Signals
drag_ended(value_changed: bool) 🔗
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. This is emitted before the corresponding Range.value_changed signal.
Property Descriptions
If true
, the slider can be interacted with. If false
, the value can be changed only by code.
If true
, the value can be changed using the mouse wheel.
Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers.
bool ticks_on_borders = false 🔗
If true
, the slider will display ticks for minimum and maximum values.
Theme Property Descriptions
Boolean constant. If 1
, the grabber texture size will be ignored and it will fit within slider's bounds based only on its center position.
Vertical or horizontal offset of the grabber.
The texture for the grabber (the draggable element).
Texture2D grabber_disabled 🔗
The texture for the grabber when it's disabled.
Texture2D grabber_highlight 🔗
The texture for the grabber when it's focused.
The texture for the ticks, visible when tick_count is greater than 0.
The background of the area to the left or bottom of the grabber.
StyleBox grabber_area_highlight 🔗
The background of the area to the left or bottom of the grabber that displays when it's being hovered or focused.
The background for the whole slider. Affects the height or width of the grabber_area.