reckfellENGINE

Slider

Shared behavior of horizontal and vertical sliders.

On this page
class SliderReckfellSharpInherits Range

Use HSlider or VSlider. Inherited Value stores the number, MinValue/MaxValue define bounds and Step defines numeric snapping. TickCount and TicksPosition only configure tick drawing: they do not snap Value to tick marks. For fractional values without a grid, set Step = 0 and Rounded = false.

Editable = false disables user input while retaining programmatic Value writes. Scrollable = false disables the wheel while retaining other permitted input. The wheel uses Step; final values pass through Range rules.

DragStarted/DragEnded describe mouse dragging. Programmatic Value writes do not emit them. DragEnded’s valueChanged compares normalized positions at the start and end: moving away and back can produce false. Use ValueChanged for ordinary value reactions, subject to Range exceptions.

TickCount defaults to 0; fewer than two ticks draw no marks. TicksOnBorders controls endpoint marks; intermediate ticks are evenly spaced rather than derived from Step. Horizontal direction respects RTL; vertical values increase upward.

Range.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Properties5

EditableProperty
# Editable
C#
public bool Editable { get; set; }

Allows user input, default true. false disables user actions and clears active dragging; programmatic Value writes remain available.

ScrollableProperty
# Scrollable
C#
public bool Scrollable { get; set; }

Allows mouse-wheel changes, default true. false does not disable dragging, keys or programmatic assignment. Editable = false still blocks input.

TickCountProperty
# TickCount
C#
public int TickCount { get; set; }

Number of evenly spaced ticks, default 0. Fewer than two are not drawn. Does not set Step or constrain Value; TicksOnBorders separately controls endpoint marks.

TicksOnBordersProperty
# TicksOnBorders
C#
public bool TicksOnBorders { get; set; }

Draw endpoint ticks, default false. TickCount = 2 with false skips both marks. Does not affect Range bounds or snapping.

TicksPositionProperty
# TicksPosition
C#
public Slider.TickPosition TicksPosition { get; set; }

Tick placement: BottomRight, TopLeft, Both or Center. Default BottomRight. Affects drawing rather than Value or tick count.

Methods10

GetTicksint
# GetTicks
C#
public int GetTicks();

Number of evenly spaced ticks, default 0. Fewer than two are not drawn. Does not set Step or constrain Value; TicksOnBorders separately controls endpoint marks.

Returns int

Current setting rather than confirmation of input or visual validation.

GetTicksOnBordersbool
# GetTicksOnBorders
C#
public bool GetTicksOnBorders();

Draw endpoint ticks, default false. TickCount = 2 with false skips both marks. Does not affect Range bounds or snapping.

Returns bool

Current setting rather than confirmation of input or visual validation.

GetTicksPositionSlider.TickPosition
# GetTicksPosition
C#
public Slider.TickPosition GetTicksPosition();

Tick placement: BottomRight, TopLeft, Both or Center. Default BottomRight. Affects drawing rather than Value or tick count.

Returns Slider.TickPosition

Current setting rather than confirmation of input or visual validation.

IsEditablebool
# IsEditable
C#
public bool IsEditable();

Allows user input, default true. false disables user actions and clears active dragging; programmatic Value writes remain available.

Returns bool

Current setting rather than confirmation of input or visual validation.

IsScrollablebool
# IsScrollable
C#
public bool IsScrollable();

Allows mouse-wheel changes, default true. false does not disable dragging, keys or programmatic assignment. Editable = false still blocks input.

Returns bool

Current setting rather than confirmation of input or visual validation.

SetEditablevoid
# SetEditable
C#
public void SetEditable(bool editable);

Allows user input, default true. false disables user actions and clears active dragging; programmatic Value writes remain available.

Parameters
NameTypeDefault
editablebool—
editable

Allows user input, default true. false disables user actions and clears active dragging; programmatic Value writes remain available.

SetScrollablevoid
# SetScrollable
C#
public void SetScrollable(bool scrollable);

Allows mouse-wheel changes, default true. false does not disable dragging, keys or programmatic assignment. Editable = false still blocks input.

Parameters
NameTypeDefault
scrollablebool—
scrollable

Allows mouse-wheel changes, default true. false does not disable dragging, keys or programmatic assignment. Editable = false still blocks input.

SetTicksvoid
# SetTicks
C#
public void SetTicks(int count);

Number of evenly spaced ticks, default 0. Fewer than two are not drawn. Does not set Step or constrain Value; TicksOnBorders separately controls endpoint marks.

Parameters
NameTypeDefault
countint—
count

Number of evenly spaced ticks, default 0. Fewer than two are not drawn. Does not set Step or constrain Value; TicksOnBorders separately controls endpoint marks.

SetTicksOnBordersvoid
# SetTicksOnBorders
C#
public void SetTicksOnBorders(bool ticksOnBorder);

Draw endpoint ticks, default false. TickCount = 2 with false skips both marks. Does not affect Range bounds or snapping.

Parameters
NameTypeDefault
ticksOnBorderbool—
ticksOnBorder

Draw endpoint ticks, default false. TickCount = 2 with false skips both marks. Does not affect Range bounds or snapping.

SetTicksPositionvoid
# SetTicksPosition
C#
public void SetTicksPosition(Slider.TickPosition ticksOnBorder);

Tick placement: BottomRight, TopLeft, Both or Center. Default BottomRight. Affects drawing rather than Value or tick count.

Parameters
NameTypeDefault
ticksOnBorderSlider.TickPosition—
ticksOnBorder

Slider.TickPosition tick placement. Parameter name ticksOnBorder does not mean bool.

Signals and events2

DragEndedEvent
# DragEnded
C#
public event Slider.DragEndedEventHandler DragEnded;

End of dragging. valueChanged compares normalized positions at the start and end rather than detecting any intermediate motion. Programmatic Value assignment does not emit it.

Handler parameters
NameTypeDefault
valueChangedbool—
valueChanged

true when final normalized position differs from its initial position; not a record of any intermediate motion.

DragStartedEvent
# DragStarted
C#
public event Action DragStarted;

Beginning of mouse dragging. Ordinary Value writes and wheel changes do not form this drag-signal pair. Use ValueChanged for values.

Slider.TickPosition

ValueDescription
Both = 2

Places the ticks at the both sides of the slider.

BottomRight = 0

Places the ticks at the bottom of the HSlider, or right of the VSlider.

Center = 3

Places the ticks at the center of the slider.

TopLeft = 1

Places the ticks at the top of the HSlider, or left of the VSlider.

Theme properties

These are Theme resource keys, not C# properties. Use the matching Control GetTheme…() and AddTheme…Override() methods for each value type.

Key and typeDescription
center_grabber
int

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.

Default: 0
grabber_max_size
int

The maximum allowed size of the Slider's grabber icon. The grabber texture is scaled down so its widest axis is Slider.grabber_max_size and the other axis is scaled keeping the original ratio.

Default: 0
grabber_offset
int

Vertical or horizontal offset of the grabber.

Default: 0
tick_max_size
int

The maximum allowed size of the Slider's tick icons. The tick texture is scaled down so its widest axis is Slider.tick_max_size and the other axis is scaled keeping the original ratio.

Default: 0
tick_offset
int

Vertical or horizontal offset of the ticks. The offset is reversed for top or left ticks.

Default: 0
grabber
Texture2D

The texture for the grabber (the draggable element).

grabber_disabled
Texture2D

The texture for the grabber when it's disabled.

grabber_highlight
Texture2D

The texture for the grabber when it's focused.

tick
Texture2D

The texture for the ticks, visible when Slider.TickCount is greater than 0.

drag_ended_sound
AudioStream

Played when mouse or touch drag ends. This is also used by SpinBox when dragging over its arrows, or ColorPicker when dragging over its color wheel/rectangle.

drag_started_sound
AudioStream

Played when mouse or touch drag begins. This is also used by SpinBox when dragging over its arrows, or ColorPicker when dragging over its color wheel/rectangle.

focus_sound
AudioStream

Played when this Slider receives keyboard or gamepad-induced focus. Mouse or touch-induced focus does not play a focus sound.

value_change_rejected_sound
AudioStream

Played when the value is attempted to be changed through keyboard or gamepad input, but the value is already at the minimum (or maximum).

value_changed_sound
AudioStream

Played when the value is changed through keyboard or gamepad input. If the value is already at the minimum (or maximum), Slider.value_change_rejected_sound is played instead.

grabber_area
StyleBox

The background of the area to the left or bottom of the grabber.

grabber_area_highlight
StyleBox

The background of the area to the left or bottom of the grabber that displays when it's being hovered or focused.

slider
StyleBox

The background for the whole slider. Affects the height or width of the Slider.grabber_area.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.