EditorSpinSlider
继承: Range < Control < CanvasItem < Node < Object
Godot 编辑器用于编辑数值的控件。
描述
这个 Control 节点在编辑器的检查器面板中使用,允许编辑数值。可以与 EditorInspectorPlugin 一起使用,以重新创建相同的行为。
如果 Range.step 值为 1,则 EditorSpinSlider 将显示向上/向下箭头,类似于 SpinBox。如果 Range.step 值不是 1,则会显示一个滑块。
属性
|
||
|
||
|
||
focus_mode |
|
|
|
||
|
||
|
||
BitField[SizeFlags] |
size_flags_vertical |
|
step |
|
|
|
主题属性
信号
grabbed() 🔗
当微调器/滑块被抓取时发出。
ungrabbed() 🔗
当微调器/滑块取消抓取时发出。
updown_pressed() 🔗
当按下上下按钮时发出。
value_focus_entered() 🔗
值表单获得焦点时发出。
value_focus_exited() 🔗
值表单丢失焦点时发出。
枚举
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.
属性说明
ControlState control_state = 0 🔗
void set_control_state(value: ControlState)
ControlState get_control_state()
The state in which the control used to manipulate the value will be.
bool editing_integer = false 🔗
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.
如果为 true,则滑块不会绘制背景。
已弃用: Use control_state instead.
如果为 true,则隐藏滑块和向上/向下箭头。
在值的左侧显示的文本。
如果为 true,则无法与滑块交互。
在值之后显示的后缀(以一种淡化的颜色显示)。这通常应该是一个复数形式的词。如果后缀太长而无法显示,可能必须使用缩写。
主题属性说明
代表上下按钮的单张纹理。
控件只读或禁用时,代表上下按钮的单张纹理。