Class Slider
Abstract base class for sliders.
- Inheritance
-
Slider
- Derived
Remarks
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
editable
If true
, the slider can be interacted with. If false
, the value can be changed only by code.
var editable : bool = true
Property Value
Remarks
scrollable
If true
, the value can be changed using the mouse wheel.
var scrollable : bool = true
Property Value
Remarks
tick_count
Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers.
var tick_count : int = 0
Property Value
Remarks
ticks_on_borders
If true
, the slider will display ticks for minimum and maximum values.
var ticks_on_borders : bool = false
Property Value
Remarks
center_grabber
Theme Property
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.
= ``0``
Property Value
grabber_offset
Theme Property
Vertical or horizontal offset of the grabber.
= ``0``
Property Value
grabber
Theme Property
The texture for the grabber (the draggable element).
Texture2D grabber
Property Value
grabber_disabled
Theme Property
The texture for the grabber when it's disabled.
Texture2D grabber_disabled
Property Value
grabber_highlight
Theme Property
The texture for the grabber when it's focused.
Texture2D grabber_highlight
Property Value
tick
Theme Property
The texture for the ticks, visible when tick_count is greater than 0.
Texture2D tick
Property Value
grabber_area
Theme Property
The background of the area to the left or bottom of the grabber.
StyleBox grabber_area
Property Value
grabber_area_highlight
Theme Property
The background of the area to the left or bottom of the grabber that displays when it's being hovered or focused.
StyleBox grabber_area_highlight
Property Value
slider
Theme Property
The background for the whole slider. Affects the height or width of the grabber_area.
StyleBox slider
Property Value
Events
drag_ended(bool)
Emitted when the grabber stops being dragged. If value_changed
is true
, value is different from the value when the dragging was started.
signal drag_ended(bool value_changed)
Parameters
value_changed
bool
drag_started
Emitted when the grabber starts being dragged. This is emitted before the corresponding Range.value_changed signal.
signal drag_started