Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
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() 🔗
Emitted when the updown button is 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 deferred_drag_mode = false 🔗
If true, changing via dragging is applied only at the end of the input (for example, when the user releases a mouse button).
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.
If true, the slider and up/down arrows are hidden.
在值的左側顯示的文字。
如果為 true,則無法與滑桿互動。
在值之後顯示的後綴(以一種淡化的顏色顯示)。這通常應該是一個複數形式的詞。如果後綴太長而無法顯示,可能必須使用縮寫。
主題屬性說明
Single texture representing both the up and down buttons.
Single texture representing both the up and down buttons, when the control is readonly or disabled.