EditorSpinSlider

Hereda: Range < Control < CanvasItem < Node < Object

Control del editor Godot para editar valores numéricos.

Descripción

Este nodo Control se utiliza en el panel Inspector del editor para permitir la edición de valores numéricos. Puede usarse con EditorInspectorPlugin para recrear el mismo comportamiento.

Si el valor de Range.step es 1, el EditorSpinSlider mostrará flechas arriba/abajo, similar a SpinBox. Si el valor de Range.step no es 1, se mostrará un deslizador en su lugar.

Propiedades

ControlState

control_state

0

bool

editing_integer

false

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

""

Propiedades del Tema

Texture2D

updown

Texture2D

updown_disabled


Señales

grabbed() 🔗

Emitted when the spinner/slider is grabbed.


ungrabbed() 🔗

Emitted when the spinner/slider is ungrabbed.


updown_pressed() 🔗

Emitida cuando se presiona el botón de arriba/abajo.


value_focus_entered() 🔗

Emitida cuando el formulario del valor obtiene el foco.


value_focus_exited() 🔗

Emitida cuando el formulario del valor pierde el foco.


Enumeraciones

enum ControlState: 🔗

ControlState CONTROL_STATE_DEFAULT = 0

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

ControlState CONTROL_STATE_PREFER_SLIDER = 1

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

ControlState CONTROL_STATE_HIDE = 2

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


Descripciones de Propiedades

ControlState control_state = 0 🔗

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


bool editing_integer = false 🔗

  • void set_editing_integer(value: bool)

  • bool is_editing_integer()

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 control_state is set to CONTROL_STATE_PREFER_SLIDER. It will also use EditorSettings.interface/inspector/integer_drag_speed instead of EditorSettings.interface/inspector/float_drag_speed if the slider is available.


bool flat = false 🔗

  • void set_flat(value: bool)

  • bool is_flat()

Si es true, el deslizador no dibujará el fondo.


bool hide_slider = false 🔗

  • void set_hide_slider(value: bool)

  • bool is_hiding_slider()

Obsoleto: Use control_state instead.

Si es true, el deslizador y las flechas arriba/abajo están ocultas.


String label = "" 🔗

El texto que se muestra a la izquierda del valor.


bool read_only = false 🔗

  • void set_read_only(value: bool)

  • bool is_read_only()

Si es true, no se puede interactuar con el deslizador.


String suffix = "" 🔗

El sufijo a mostrar después del valor (en un color atenuado). Por lo general, debería ser una palabra en plural. Es posible que tengas que utilizar una abreviatura si el sufijo es demasiado largo para mostrarse.


Descripciones de las propiedades del tema

Texture2D updown 🔗

Textura única que representa los botones de arriba y abajo.


Texture2D updown_disabled 🔗

Textura única que representa los botones de arriba y abajo, cuando el control es de solo lectura o está deshabilitado.