Skip to content
0.2.0-dev Download ZIP
63 lines ·3.7 KB Raw
1<?xml version="1.0" encoding="UTF-8" ?>
2<class name="ProgressBar" inherits="Range" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 A control used for visual representation of a percentage.
5 </brief_description>
6 <description>
7 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.
8 </description>
9 <tutorials>
10 </tutorials>
11 <members>
12 <member name="editor_preview_indeterminate" type="bool" setter="set_editor_preview_indeterminate" getter="is_editor_preview_indeterminate_enabled">
13 If [code]false[/code], the [member indeterminate] animation will be paused in the editor.
14 </member>
15 <member name="fill_mode" type="int" setter="set_fill_mode" getter="get_fill_mode" default="0">
16 The fill direction. See [enum FillMode] for possible values.
17 </member>
18 <member name="indeterminate" type="bool" setter="set_indeterminate" getter="is_indeterminate" default="false">
19 When set to [code]true[/code], the progress bar indicates that something is happening with an animation, but does not show the fill percentage or value.
20 </member>
21 <member name="show_percentage" type="bool" setter="set_show_percentage" getter="is_percentage_shown" default="true">
22 If [code]true[/code], the fill percentage is displayed on the bar.
23 </member>
24 </members>
25 <constants>
26 <constant name="FILL_BEGIN_TO_END" value="0" enum="FillMode">
27 The progress bar fills from begin to end horizontally, according to the language direction. If [method Control.is_layout_rtl] returns [code]false[/code], it fills from left to right, and if it returns [code]true[/code], it fills from right to left.
28 </constant>
29 <constant name="FILL_END_TO_BEGIN" value="1" enum="FillMode">
30 The progress bar fills from end to begin horizontally, according to the language direction. If [method Control.is_layout_rtl] returns [code]false[/code], it fills from right to left, and if it returns [code]true[/code], it fills from left to right.
31 </constant>
32 <constant name="FILL_TOP_TO_BOTTOM" value="2" enum="FillMode">
33 The progress fills from top to bottom.
34 </constant>
35 <constant name="FILL_BOTTOM_TO_TOP" value="3" enum="FillMode">
36 The progress fills from bottom to top.
37 </constant>
38 </constants>
39 <theme_items>
40 <theme_item name="font_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
41 The color of the text.
42 </theme_item>
43 <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
44 The tint of text outline of the [ProgressBar].
45 </theme_item>
46 <theme_item name="outline_size" data_type="constant" type="int" default="0">
47 The size of the text outline.
48 [b]Note:[/b] If using a font with [member FontFile.multichannel_signed_distance_field] enabled, its [member FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of [theme_item outline_size] for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.
49 </theme_item>
50 <theme_item name="font" data_type="font" type="Font">
51 Font used to draw the fill percentage if [member show_percentage] is [code]true[/code].
52 </theme_item>
53 <theme_item name="font_size" data_type="font_size" type="int">
54 Font size used to draw the fill percentage if [member show_percentage] is [code]true[/code].
55 </theme_item>
56 <theme_item name="background" data_type="style" type="StyleBox">
57 The style of the background.
58 </theme_item>
59 <theme_item name="fill" data_type="style" type="StyleBox">
60 The style of the progress (i.e. the part that fills the bar).
61 </theme_item>
62 </theme_items>
63</class>