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
將百分比視覺化表示的控制項。
說明
A control used for visual representation of a percentage. Shows the fill percentage in the center. Can also be used to show indeterminate progress. For more fill modes, use TextureProgressBar instead.
屬性
|
||
|
||
|
主題屬性
|
||
|
||
|
||
列舉
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 🔗
If false, the indeterminate animation will be paused in the editor.
填充方向。可能的取值見 FillMode。
When set to true, the progress bar indicates that something is happening with an animation, but does not show the fill percentage or value.
為 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 時,用於繪製填充百分比的字形。
背景的樣式。
進度的樣式(即填充進度條的部分)。