EditorSpinSlider

继承: Range < Control < CanvasItem < Node < Object

Godot 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.

属性

主题属性


信号

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.


属性说明

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.


主题属性说明

Texture2D updown

Single texture representing both the up and down buttons.


Texture2D updown_disabled

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

1

本方法通常需要用户覆盖才能生效。

2

本方法无副作用,不会修改该实例的任何成员变量。

3

本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。

4

本方法用于构造某个类型。

5

调用本方法无需实例,可直接使用类名进行调用。

6

本方法描述的是使用本类型作为左操作数的有效运算符。

7

这个值是由下列位标志构成位掩码的整数。

8

无返回值。