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...
ProgressBar
繼承: Range < Control < CanvasItem < Node < Object
將百分比視覺化表示的控制項。
說明
將百分比視覺化表示的控制項。在中央顯示填充百分比。還可以用來顯示尚未確定的進度。如果需要更多填充模式,請改用 TextureProgressBar。
屬性
|
||
|
||
|
主題屬性
|
||
|
||
|
||
列舉
enum FillMode: 🔗
FillMode FILL_BEGIN_TO_END = 0
進度條從開頭到結尾水平填充,開頭和結尾的位置取決於語言的方向。如果 Control.is_layout_rtl() 返回 false 則為從左至右填充,如果返回 true 則為從右至左填充。
FillMode FILL_END_TO_BEGIN = 1
進度條從結尾到開頭水平填充,開頭和結尾的位置取決於語言的方向。如果 Control.is_layout_rtl() 返回 false 則為從左至右填充,如果返回 true 則為從右至左填充。
FillMode FILL_TOP_TO_BOTTOM = 2
進度從上到下填充。
FillMode FILL_BOTTOM_TO_TOP = 3
進度從下到上填充。
屬性說明
bool editor_preview_indeterminate 🔗
如果為 false,則會在編輯器中暫停 indeterminate 動畫。
填充方向。可能的取值見 FillMode。
設為 true 時,進度表會使用動畫來表示正在執行某些操作,但是不會顯示填充和具體的值。
為 true 時,將在進度條上顯示百分比。
主題屬性說明
Color font_color = Color(0.95, 0.95, 0.95, 1) 🔗
文字的顏色。
Color font_outline_color = Color(0, 0, 0, 1) 🔗
ProgressBar 的文字輪廓的色調。
文字輪廓的大小。
注意:如果使用啟用了 FontFile.multichannel_signed_distance_field 的字形,其 FontFile.msdf_pixel_range 必須至少設定為 outline_size 的兩倍,輪廓渲染才能看起來正確。否則,輪廓可能會比預期的更早被切斷。
show_percentage 為 true 時,用於繪製填充百分比的字形。
show_percentage 為 true 時,用於繪製填充百分比的字形。
背景的樣式。
進度的樣式(即填充進度條的部分)。