:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/ProgressBar.xml. .. _class_ProgressBar: ProgressBar =========== **Inherits:** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` A control used for visual representation of a percentage. .. rst-class:: classref-introduction-group Description ----------- 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 :ref:`TextureProgressBar` instead. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +-------------------------+----------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`editor_preview_indeterminate` | | +-------------------------+----------------------------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`fill_mode` | ``0`` | +-------------------------+----------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`indeterminate` | ``false`` | +-------------------------+----------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`show_percentage` | ``true`` | +-------------------------+----------------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group Theme Properties ---------------- .. table:: :widths: auto +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ | :ref:`Color` | :ref:`font_color` | ``Color(0.95, 0.95, 0.95, 1)`` | +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ | :ref:`Color` | :ref:`font_outline_color` | ``Color(0, 0, 0, 1)`` | +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ | :ref:`Font` | :ref:`font` | | +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ | :ref:`int` | :ref:`font_size` | | +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ | :ref:`StyleBox` | :ref:`background` | | +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ | :ref:`StyleBox` | :ref:`fill` | | +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_ProgressBar_FillMode: .. rst-class:: classref-enumeration enum **FillMode**: :ref:`🔗` .. _class_ProgressBar_constant_FILL_BEGIN_TO_END: .. rst-class:: classref-enumeration-constant :ref:`FillMode` **FILL_BEGIN_TO_END** = ``0`` The progress bar fills from begin to end horizontally, according to the language direction. If :ref:`Control.is_layout_rtl()` returns ``false``, it fills from left to right, and if it returns ``true``, it fills from right to left. .. _class_ProgressBar_constant_FILL_END_TO_BEGIN: .. rst-class:: classref-enumeration-constant :ref:`FillMode` **FILL_END_TO_BEGIN** = ``1`` The progress bar fills from end to begin horizontally, according to the language direction. If :ref:`Control.is_layout_rtl()` returns ``false``, it fills from right to left, and if it returns ``true``, it fills from left to right. .. _class_ProgressBar_constant_FILL_TOP_TO_BOTTOM: .. rst-class:: classref-enumeration-constant :ref:`FillMode` **FILL_TOP_TO_BOTTOM** = ``2`` The progress fills from top to bottom. .. _class_ProgressBar_constant_FILL_BOTTOM_TO_TOP: .. rst-class:: classref-enumeration-constant :ref:`FillMode` **FILL_BOTTOM_TO_TOP** = ``3`` The progress fills from bottom to top. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ProgressBar_property_editor_preview_indeterminate: .. rst-class:: classref-property :ref:`bool` **editor_preview_indeterminate** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_editor_preview_indeterminate**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_editor_preview_indeterminate_enabled**\ (\ ) If ``false``, the :ref:`indeterminate` animation will be paused in the editor. .. rst-class:: classref-item-separator ---- .. _class_ProgressBar_property_fill_mode: .. rst-class:: classref-property :ref:`int` **fill_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_fill_mode**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_fill_mode**\ (\ ) The fill direction. See :ref:`FillMode` for possible values. .. rst-class:: classref-item-separator ---- .. _class_ProgressBar_property_indeterminate: .. rst-class:: classref-property :ref:`bool` **indeterminate** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_indeterminate**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_indeterminate**\ (\ ) When set to ``true``, the progress bar indicates that something is happening with an animation, but does not show the fill percentage or value. .. rst-class:: classref-item-separator ---- .. _class_ProgressBar_property_show_percentage: .. rst-class:: classref-property :ref:`bool` **show_percentage** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_show_percentage**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_percentage_shown**\ (\ ) If ``true``, the fill percentage is displayed on the bar. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_ProgressBar_theme_color_font_color: .. rst-class:: classref-themeproperty :ref:`Color` **font_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗` The color of the text. .. rst-class:: classref-item-separator ---- .. _class_ProgressBar_theme_color_font_outline_color: .. rst-class:: classref-themeproperty :ref:`Color` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗` The tint of text outline of the **ProgressBar**. .. rst-class:: classref-item-separator ---- .. _class_ProgressBar_theme_constant_outline_size: .. rst-class:: classref-themeproperty :ref:`int` **outline_size** = ``0`` :ref:`🔗` The size of the text outline. \ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. .. rst-class:: classref-item-separator ---- .. _class_ProgressBar_theme_font_font: .. rst-class:: classref-themeproperty :ref:`Font` **font** :ref:`🔗` Font used to draw the fill percentage if :ref:`show_percentage` is ``true``. .. rst-class:: classref-item-separator ---- .. _class_ProgressBar_theme_font_size_font_size: .. rst-class:: classref-themeproperty :ref:`int` **font_size** :ref:`🔗` Font size used to draw the fill percentage if :ref:`show_percentage` is ``true``. .. rst-class:: classref-item-separator ---- .. _class_ProgressBar_theme_style_background: .. rst-class:: classref-themeproperty :ref:`StyleBox` **background** :ref:`🔗` The style of the background. .. rst-class:: classref-item-separator ---- .. _class_ProgressBar_theme_style_fill: .. rst-class:: classref-themeproperty :ref:`StyleBox` **fill** :ref:`🔗` The style of the progress (i.e. the part that fills the bar). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`