Slider
Abstract base class for sliders.
Slider.swift:23class Slider
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.
This object emits the following signals:
Superclasses
class Range
Abstract base class for controls that represent a number within a range.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Types
class Signal1
Signal support.
Type members
Instance members
var dragEnded: Signal1
Emitted when dragging stops. If
valueChanged
is true,value
is different from the value when you started the dragging.var dragStarted: SimpleSignal
Emitted when dragging is started. This is emitted before the corresponding [signal Range.value_changed] signal.
var editable: Bool
If
true
, the slider can be interacted with. Iffalse
, the value can be changed only by code.var scrollable: Bool
If
true
, the value can be changed using the mouse wheel.var tickCount: Int32
Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers.
var ticksOnBorders: Bool
If
true
, the slider will display ticks for minimum and maximum values.
Subclasses
class HSlider
A horizontal slider that goes from left (min) to right (max).
class VSlider
A vertical slider that goes from bottom (min) to top (max).