ProgressBar
继承: Range
< Control
< CanvasItem
< Node
< Object
A control used for visual representation of a percentage.
描述
A control used for visual representation of a percentage. Shows fill percentage from right to left.
属性
主题属性
Color | font_color |
Color | font_outline_color |
int | outline_size |
Font | font |
int | font_size |
StyleBox | background |
StyleBox | fill |
枚举
enum FillMode:
FillMode FILL_BEGIN_TO_END = 0
The progress bar fills from begin to end horizontally, according to the language direction. If Control.is_layout_rtl
returns false
, it fills from left to right, and if it returns true
, it fills from right to left.
FillMode FILL_END_TO_BEGIN = 1
The progress bar fills from end to begin horizontally, according to the language direction. If Control.is_layout_rtl
returns false
, it fills from right to left, and if it returns true
, it fills from left to right.
FillMode FILL_TOP_TO_BOTTOM = 2
The progress fills from top to bottom.
FillMode FILL_BOTTOM_TO_TOP = 3
The progress fills from bottom to top.
属性说明
bool
editor_preview_indeterminate
void
set_editor_preview_indeterminate ( value:bool
)bool
is_editor_preview_indeterminate_enabled ( )
If false
, the indeterminate
animation will be paused in the editor.
int
fill_mode = 0
The fill direction. See FillMode for possible values.
bool
indeterminate = false
When set to true
, the progress bar indicates that something is happening with an animation, but does not show the fill percentage or value.
bool
show_percentage = true
If true
, the fill percentage is displayed on the bar.
主题属性说明
Color
font_color = Color(0.95, 0.95, 0.95, 1)
The color of the text.
Color
font_outline_color = Color(0, 0, 0, 1)
The tint of text outline of the ProgressBar.
int
outline_size = 0
The size of the text outline.
Note: If using a font with FontFile.multichannel_signed_distance_field
enabled, its FontFile.msdf_pixel_range
must be set to at least twice the value of outline_size
for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.
Font
font
Font used to draw the fill percentage if show_percentage
is true
.
int
font_size
Font size used to draw the fill percentage if show_percentage
is true
.
StyleBox
background
The style of the background.
StyleBox
fill
The style of the progress (i.e. the part that fills the bar).
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。