Table of Contents

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

bool

Scrollable

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

public bool Scrollable { get; set; }

Property Value

bool

TickCount

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

public int TickCount { get; set; }

Property Value

int

TicksOnBorders

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

public bool TicksOnBorders { get; set; }

Property Value

bool

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_name

Name of the method to check for.

Returns

bool

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_name

Name of the signal to check for.

Returns

bool

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_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool

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

Slider.DragEndedEventHandler

DragStarted

Emitted when dragging is started.

public event Action DragStarted

Event Type

Action