Up to date

This page is up to date for Godot 4.3. If you still find outdated information, please open an issue.

EditorSpinSliderΒΆ

Inherits: Range < Control < CanvasItem < Node < Object

Godot editor's control for editing numeric values.

DescriptionΒΆ

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.

PropertiesΒΆ

bool

flat

false

FocusMode

focus_mode

2 (overrides Control)

bool

hide_slider

false

String

label

""

bool

read_only

false

BitField[SizeFlags]

size_flags_vertical

1 (overrides Control)

float

step

1.0 (overrides Range)

String

suffix

""


SignalsΒΆ

grabbed() πŸ”—

Emitted when the spinner/slider is grabbed.


ungrabbed() πŸ”—

Emitted when the spinner/slider is ungrabbed.


value_focus_entered() πŸ”—

Emitted when the value form gains focus.


value_focus_exited() πŸ”—

Emitted when the value form loses focus.


Property DescriptionsΒΆ

bool flat = false πŸ”—

  • void set_flat(value: bool)

  • bool is_flat()

If true, the slider will not draw background.


bool hide_slider = false πŸ”—

  • void set_hide_slider(value: bool)

  • bool is_hiding_slider()

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


String label = "" πŸ”—

The text that displays to the left of the value.


bool read_only = false πŸ”—

  • void set_read_only(value: bool)

  • bool is_read_only()

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


String suffix = "" πŸ”—

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.