reckfellENGINE

EditorSpinSlider

Reckfell editor's control for editing numeric values.

On this page
class EditorSpinSliderReckfellSharpEditorInherits Range

Reckfell editor's control for editing numeric values.

This Control node is used in the editor's Inspector dock to allow editing of numeric values. Can be used with EditorInspectorPlugin to recreate the same behavior. If the Range.Step value is 1, the EditorSpinSlider will display up/down arrows, similar to SpinBox. If the Range.Step value is not 1, a slider will be displayed instead.

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

Constructors1

EditorSpinSliderConstructor
# EditorSpinSlider
C#
public EditorSpinSlider();

Properties8

ControlStateProperty
# ControlState
C#
public EditorSpinSlider.ControlStateEnum ControlState { get; set; }

The state in which the control used to manipulate the value will be.

DeferredDragModeProperty
# DeferredDragMode
C#
public bool DeferredDragMode { get; set; }

If true, changing via dragging is applied only at the end of the input (for example, when the user releases a mouse button).

EditingIntegerProperty
# EditingInteger
C#
public bool EditingInteger { get; set; }

If true, the EditorSpinSlider is considered to be editing an integer value. If false, the EditorSpinSlider is considered to be editing a floating-point value. This is used to determine whether a slider should be drawn by default. The slider is only drawn for floats; integers use up-down arrows similar to SpinBox instead, unless EditorSpinSlider.ControlState is set to EditorSpinSlider.ControlStateEnum.PreferSlider. It will also use EditorSettings.interface/inspector/integer_drag_speed instead of EditorSettings.interface/inspector/float_drag_speed if the slider is available.

FlatProperty
# Flat
C#
public bool Flat { get; set; }

If true, the slider will not draw background.

HideSliderProperty · Deprecated
# HideSlider
C#
public bool HideSlider { get; set; }

If true, the slider and up/down arrows are hidden.

LabelProperty
# Label
C#
public string Label { get; set; }

The text that displays to the left of the value.

ReadOnlyProperty
# ReadOnly
C#
public bool ReadOnly { get; set; }

If true, the slider can't be interacted with.

SuffixProperty
# Suffix
C#
public string Suffix { get; set; }

The suffix to display after the value (in a faded color). This should generally be a plural word. You may have to use an abbreviation if the suffix is too long to be displayed.

Methods16

GetControlStateEditorSpinSlider.ControlStateEnum
# GetControlState
C#
public EditorSpinSlider.ControlStateEnum GetControlState();
Returns EditorSpinSlider.ControlStateEnum
GetLabelstring
# GetLabel
C#
public string GetLabel();
Returns string
GetSuffixstring
# GetSuffix
C#
public string GetSuffix();
Returns string
IsDeferredDragModeEnabledbool
# IsDeferredDragModeEnabled
C#
public bool IsDeferredDragModeEnabled();
Returns bool
IsEditingIntegerbool
# IsEditingInteger
C#
public bool IsEditingInteger();
Returns bool
IsFlatbool
# IsFlat
C#
public bool IsFlat();
Returns bool
IsHidingSliderbool
# IsHidingSlider
C#
public bool IsHidingSlider();
Returns bool
IsReadOnlybool
# IsReadOnly
C#
public bool IsReadOnly();
Returns bool
SetControlStatevoid
# SetControlState
C#
public void SetControlState(EditorSpinSlider.ControlStateEnum state);
Parameters
NameTypeDefault
stateEditorSpinSlider.ControlStateEnum—
SetDeferredDragModeEnabledvoid
# SetDeferredDragModeEnabled
C#
public void SetDeferredDragModeEnabled(bool enabled = true);
Parameters
NameTypeDefault
enabledbooltrue
SetEditingIntegervoid
# SetEditingInteger
C#
public void SetEditingInteger(bool editingInteger);
Parameters
NameTypeDefault
editingIntegerbool—
SetFlatvoid
# SetFlat
C#
public void SetFlat(bool flat);
Parameters
NameTypeDefault
flatbool—
SetHideSlidervoid
# SetHideSlider
C#
public void SetHideSlider(bool hideSlider);
Parameters
NameTypeDefault
hideSliderbool—
SetLabelvoid
# SetLabel
C#
public void SetLabel(string label);
Parameters
NameTypeDefault
labelstring—
SetReadOnlyvoid
# SetReadOnly
C#
public void SetReadOnly(bool readOnly);
Parameters
NameTypeDefault
readOnlybool—
SetSuffixvoid
# SetSuffix
C#
public void SetSuffix(string suffix);
Parameters
NameTypeDefault
suffixstring—

Signals and events5

GrabbedEvent
# Grabbed
C#
public event Action Grabbed;

Emitted when the spinner/slider is grabbed.

UngrabbedEvent
# Ungrabbed
C#
public event Action Ungrabbed;

Emitted when the spinner/slider is ungrabbed.

UpdownPressedEvent
# UpdownPressed
C#
public event Action UpdownPressed;

Emitted when the updown button is pressed.

ValueFocusEnteredEvent
# ValueFocusEntered
C#
public event Action ValueFocusEntered;

Emitted when the value form gains focus.

ValueFocusExitedEvent
# ValueFocusExited
C#
public event Action ValueFocusExited;

Emitted when the value form loses focus.

EditorSpinSlider.ControlStateEnum

ValueDescription
Default = 0

The type of control used will depend on the value of EditorSpinSlider.EditingInteger. Up-down arrows if true, a slider if false.

Hide = 2

Neither the up-down arrows nor the slider will be shown.

PreferSlider = 1

A slider will always be used, even if EditorSpinSlider.EditingInteger is enabled.

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
label_color
Color

Font color of the left label (see EditorSpinSlider.Label).

Default: Color(0, 0, 0, 1)
read_only_label_color
Color

Font color of the left label, when EditorSpinSlider.ReadOnly is enabled.

Default: Color(0, 0, 0, 1)
line_edit_margin
int

Left margin of the internal LineEdit, used to align text.

Default: 0
line_edit_margin_empty
int

Left margin of the internal LineEdit, when EditorSpinSlider.Label is empty.

Default: 0
updown
Texture2D

Single texture representing both the up and down buttons.

updown_disabled
Texture2D

Single texture representing both the up and down buttons, when the control is readonly or disabled.

label_bg
StyleBox

Background stylebox for the left label, displayed when EditorSpinSlider.Flat is enabled.

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.