EditorSpinSlider

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

Godot 編輯器用於編輯數值的控制項。

說明

這個 Control 節點用於編輯器的屬性檢視器面板中,以允許編輯數值。可與 EditorInspectorPlugin 一起使用以達到相同的效果。

如果 Range.step 值是 1EditorSpinSlider 將會顯示向上/向下箭頭,類似於 SpinBox。如果 Range.step 值不是 1,將會顯示滑桿代替。

屬性

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

""

主題屬性

Texture2D

updown

Texture2D

updown_disabled


訊號

grabbed() 🔗

當微調器/滑桿被抓取時發出。


ungrabbed() 🔗

當微調器/滑桿取消抓取時發出。


updown_pressed() 🔗

Emitted when the updown button is pressed.


value_focus_entered() 🔗

值表單獲得焦點時發出。


value_focus_exited() 🔗

值表單丟失焦點時發出。


屬性說明

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. The slider is only drawn for floats; integers use up-down arrows similar to SpinBox instead.


bool flat = false 🔗

  • void set_flat(value: bool)

  • bool is_flat()

如果為 true,則滑桿不會繪製背景。


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 = "" 🔗

在值的左側顯示的文字。


bool read_only = false 🔗

  • void set_read_only(value: bool)

  • bool is_read_only()

如果為 true,則無法與滑桿互動。


String suffix = "" 🔗

在值之後顯示的後綴(以一種淡化的顏色顯示)。這通常應該是一個複數形式的詞。如果後綴太長而無法顯示,可能必須使用縮寫。


主題屬性說明

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.