Class Slider
- Namespace
- Godot
- Assembly
- GodotSharp.dll
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.
public class Slider : Range, IDisposable
- Inheritance
-
Slider
- Implements
- Derived
- Inherited Members
Properties
Editable
If true
, the slider can be interacted with. If false
, the value can be changed only by code.
public bool Editable { get; set; }
Property Value
Scrollable
If true
, the value can be changed using the mouse wheel.
public bool Scrollable { get; set; }
Property Value
TickCount
Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers.
public int TickCount { get; set; }
Property Value
TicksOnBorders
If true
, the slider will display ticks for minimum and maximum values.
public bool TicksOnBorders { get; set; }
Property Value
Methods
HasGodotClassMethod(in godot_string_name)
Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.
protected override bool HasGodotClassMethod(in godot_string_name method)
Parameters
method
godot_string_nameName of the method to check for.
Returns
HasGodotClassSignal(in godot_string_name)
Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.
protected override bool HasGodotClassSignal(in godot_string_name signal)
Parameters
signal
godot_string_nameName of the signal to check for.
Returns
InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)
Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
Parameters
method
godot_string_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.
Returns
Events
DragEnded
Emitted when dragging stops. If valueChanged
is true, Value is different from the value when you started the dragging.
public event Slider.DragEndedEventHandler DragEnded
Event Type
DragStarted
Emitted when dragging is started.
public event Action DragStarted