Files
godot-docs/classes/class_progressbar.rst
2022-07-27 13:59:06 +02:00

195 lines
8.0 KiB
ReStructuredText

: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<class_Range>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
General-purpose progress bar.
Description
-----------
General-purpose progress bar. Shows fill percentage from right to left.
Properties
----------
+-------------------------+--------------------------------------------------------------------+----------+
| :ref:`int<class_int>` | :ref:`fill_mode<class_ProgressBar_property_fill_mode>` | ``0`` |
+-------------------------+--------------------------------------------------------------------+----------+
| :ref:`bool<class_bool>` | :ref:`percent_visible<class_ProgressBar_property_percent_visible>` | ``true`` |
+-------------------------+--------------------------------------------------------------------+----------+
Theme Properties
----------------
+---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
| :ref:`Color<class_Color>` | :ref:`font_color<class_ProgressBar_theme_color_font_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
+---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
| :ref:`Color<class_Color>` | :ref:`font_outline_color<class_ProgressBar_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` |
+---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
| :ref:`Color<class_Color>` | :ref:`font_shadow_color<class_ProgressBar_theme_color_font_shadow_color>` | ``Color(0, 0, 0, 1)`` |
+---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
| :ref:`int<class_int>` | :ref:`outline_size<class_ProgressBar_theme_constant_outline_size>` | ``0`` |
+---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
| :ref:`Font<class_Font>` | :ref:`font<class_ProgressBar_theme_font_font>` | |
+---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
| :ref:`int<class_int>` | :ref:`font_size<class_ProgressBar_theme_font_size_font_size>` | |
+---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`bg<class_ProgressBar_theme_style_bg>` | |
+---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`fg<class_ProgressBar_theme_style_fg>` | |
+---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
Enumerations
------------
.. _enum_ProgressBar_FillMode:
.. _class_ProgressBar_constant_FILL_BEGIN_TO_END:
.. _class_ProgressBar_constant_FILL_END_TO_BEGIN:
.. _class_ProgressBar_constant_FILL_TOP_TO_BOTTOM:
.. _class_ProgressBar_constant_FILL_BOTTOM_TO_TOP:
enum **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<class_Control_method_is_layout_rtl>` returns ``false``, it fills from left to right, and if it returns ``true``, it fills from right to left.
- **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<class_Control_method_is_layout_rtl>` returns ``false``, it fills from right to left, and if it returns ``true``, it fills from left to right.
- **FILL_TOP_TO_BOTTOM** = **2** --- The progress fills from top to bottom.
- **FILL_BOTTOM_TO_TOP** = **3** --- The progress fills from bottom to top.
Property Descriptions
---------------------
.. _class_ProgressBar_property_fill_mode:
- :ref:`int<class_int>` **fill_mode**
+-----------+----------------------+
| *Default* | ``0`` |
+-----------+----------------------+
| *Setter* | set_fill_mode(value) |
+-----------+----------------------+
| *Getter* | get_fill_mode() |
+-----------+----------------------+
The fill direction. See :ref:`FillMode<enum_ProgressBar_FillMode>` for possible values.
----
.. _class_ProgressBar_property_percent_visible:
- :ref:`bool<class_bool>` **percent_visible**
+-----------+----------------------------+
| *Default* | ``true`` |
+-----------+----------------------------+
| *Setter* | set_percent_visible(value) |
+-----------+----------------------------+
| *Getter* | is_percent_visible() |
+-----------+----------------------------+
If ``true``, the fill percentage is displayed on the bar.
Theme Property Descriptions
---------------------------
.. _class_ProgressBar_theme_color_font_color:
- :ref:`Color<class_Color>` **font_color**
+-----------+--------------------------------+
| *Default* | ``Color(0.95, 0.95, 0.95, 1)`` |
+-----------+--------------------------------+
The color of the text.
----
.. _class_ProgressBar_theme_color_font_outline_color:
- :ref:`Color<class_Color>` **font_outline_color**
+-----------+-----------------------+
| *Default* | ``Color(1, 1, 1, 1)`` |
+-----------+-----------------------+
The tint of text outline of the ``ProgressBar``.
----
.. _class_ProgressBar_theme_color_font_shadow_color:
- :ref:`Color<class_Color>` **font_shadow_color**
+-----------+-----------------------+
| *Default* | ``Color(0, 0, 0, 1)`` |
+-----------+-----------------------+
The color of the text's shadow.
----
.. _class_ProgressBar_theme_constant_outline_size:
- :ref:`int<class_int>` **outline_size**
+-----------+-------+
| *Default* | ``0`` |
+-----------+-------+
The size of the text outline.
----
.. _class_ProgressBar_theme_font_font:
- :ref:`Font<class_Font>` **font**
Font used to draw the fill percentage if :ref:`percent_visible<class_ProgressBar_property_percent_visible>` is ``true``.
----
.. _class_ProgressBar_theme_font_size_font_size:
- :ref:`int<class_int>` **font_size**
Font size used to draw the fill percentage if :ref:`percent_visible<class_ProgressBar_property_percent_visible>` is ``true``.
----
.. _class_ProgressBar_theme_style_bg:
- :ref:`StyleBox<class_StyleBox>` **bg**
The style of the background.
----
.. _class_ProgressBar_theme_style_fg:
- :ref:`StyleBox<class_StyleBox>` **fg**
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.)`
.. |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.)`