class_progressbar.rst 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/ProgressBar.xml.
  6. .. _class_ProgressBar:
  7. ProgressBar
  8. ===========
  9. **Inherits:** :ref:`Range<class_Range>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. A control used for visual representation of a percentage.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. A control used for visual representation of a percentage. Shows fill percentage from right to left.
  15. .. rst-class:: classref-reftable-group
  16. Properties
  17. ----------
  18. .. table::
  19. :widths: auto
  20. +-------------------------+----------------------------------------------------------------------------------------------+-----------+
  21. | :ref:`bool<class_bool>` | :ref:`editor_preview_indeterminate<class_ProgressBar_property_editor_preview_indeterminate>` | |
  22. +-------------------------+----------------------------------------------------------------------------------------------+-----------+
  23. | :ref:`int<class_int>` | :ref:`fill_mode<class_ProgressBar_property_fill_mode>` | ``0`` |
  24. +-------------------------+----------------------------------------------------------------------------------------------+-----------+
  25. | :ref:`bool<class_bool>` | :ref:`indeterminate<class_ProgressBar_property_indeterminate>` | ``false`` |
  26. +-------------------------+----------------------------------------------------------------------------------------------+-----------+
  27. | :ref:`bool<class_bool>` | :ref:`show_percentage<class_ProgressBar_property_show_percentage>` | ``true`` |
  28. +-------------------------+----------------------------------------------------------------------------------------------+-----------+
  29. .. rst-class:: classref-reftable-group
  30. Theme Properties
  31. ----------------
  32. .. table::
  33. :widths: auto
  34. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  35. | :ref:`Color<class_Color>` | :ref:`font_color<class_ProgressBar_theme_color_font_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
  36. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  37. | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_ProgressBar_theme_color_font_outline_color>` | ``Color(0, 0, 0, 1)`` |
  38. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  39. | :ref:`int<class_int>` | :ref:`outline_size<class_ProgressBar_theme_constant_outline_size>` | ``0`` |
  40. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  41. | :ref:`Font<class_Font>` | :ref:`font<class_ProgressBar_theme_font_font>` | |
  42. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  43. | :ref:`int<class_int>` | :ref:`font_size<class_ProgressBar_theme_font_size_font_size>` | |
  44. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  45. | :ref:`StyleBox<class_StyleBox>` | :ref:`background<class_ProgressBar_theme_style_background>` | |
  46. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  47. | :ref:`StyleBox<class_StyleBox>` | :ref:`fill<class_ProgressBar_theme_style_fill>` | |
  48. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  49. .. rst-class:: classref-section-separator
  50. ----
  51. .. rst-class:: classref-descriptions-group
  52. Enumerations
  53. ------------
  54. .. _enum_ProgressBar_FillMode:
  55. .. rst-class:: classref-enumeration
  56. enum **FillMode**: :ref:`🔗<enum_ProgressBar_FillMode>`
  57. .. _class_ProgressBar_constant_FILL_BEGIN_TO_END:
  58. .. rst-class:: classref-enumeration-constant
  59. :ref:`FillMode<enum_ProgressBar_FillMode>` **FILL_BEGIN_TO_END** = ``0``
  60. 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.
  61. .. _class_ProgressBar_constant_FILL_END_TO_BEGIN:
  62. .. rst-class:: classref-enumeration-constant
  63. :ref:`FillMode<enum_ProgressBar_FillMode>` **FILL_END_TO_BEGIN** = ``1``
  64. 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.
  65. .. _class_ProgressBar_constant_FILL_TOP_TO_BOTTOM:
  66. .. rst-class:: classref-enumeration-constant
  67. :ref:`FillMode<enum_ProgressBar_FillMode>` **FILL_TOP_TO_BOTTOM** = ``2``
  68. The progress fills from top to bottom.
  69. .. _class_ProgressBar_constant_FILL_BOTTOM_TO_TOP:
  70. .. rst-class:: classref-enumeration-constant
  71. :ref:`FillMode<enum_ProgressBar_FillMode>` **FILL_BOTTOM_TO_TOP** = ``3``
  72. The progress fills from bottom to top.
  73. .. rst-class:: classref-section-separator
  74. ----
  75. .. rst-class:: classref-descriptions-group
  76. Property Descriptions
  77. ---------------------
  78. .. _class_ProgressBar_property_editor_preview_indeterminate:
  79. .. rst-class:: classref-property
  80. :ref:`bool<class_bool>` **editor_preview_indeterminate** :ref:`🔗<class_ProgressBar_property_editor_preview_indeterminate>`
  81. .. rst-class:: classref-property-setget
  82. - |void| **set_editor_preview_indeterminate**\ (\ value\: :ref:`bool<class_bool>`\ )
  83. - :ref:`bool<class_bool>` **is_editor_preview_indeterminate_enabled**\ (\ )
  84. If ``false``, the :ref:`indeterminate<class_ProgressBar_property_indeterminate>` animation will be paused in the editor.
  85. .. rst-class:: classref-item-separator
  86. ----
  87. .. _class_ProgressBar_property_fill_mode:
  88. .. rst-class:: classref-property
  89. :ref:`int<class_int>` **fill_mode** = ``0`` :ref:`🔗<class_ProgressBar_property_fill_mode>`
  90. .. rst-class:: classref-property-setget
  91. - |void| **set_fill_mode**\ (\ value\: :ref:`int<class_int>`\ )
  92. - :ref:`int<class_int>` **get_fill_mode**\ (\ )
  93. The fill direction. See :ref:`FillMode<enum_ProgressBar_FillMode>` for possible values.
  94. .. rst-class:: classref-item-separator
  95. ----
  96. .. _class_ProgressBar_property_indeterminate:
  97. .. rst-class:: classref-property
  98. :ref:`bool<class_bool>` **indeterminate** = ``false`` :ref:`🔗<class_ProgressBar_property_indeterminate>`
  99. .. rst-class:: classref-property-setget
  100. - |void| **set_indeterminate**\ (\ value\: :ref:`bool<class_bool>`\ )
  101. - :ref:`bool<class_bool>` **is_indeterminate**\ (\ )
  102. When set to ``true``, the progress bar indicates that something is happening with an animation, but does not show the fill percentage or value.
  103. .. rst-class:: classref-item-separator
  104. ----
  105. .. _class_ProgressBar_property_show_percentage:
  106. .. rst-class:: classref-property
  107. :ref:`bool<class_bool>` **show_percentage** = ``true`` :ref:`🔗<class_ProgressBar_property_show_percentage>`
  108. .. rst-class:: classref-property-setget
  109. - |void| **set_show_percentage**\ (\ value\: :ref:`bool<class_bool>`\ )
  110. - :ref:`bool<class_bool>` **is_percentage_shown**\ (\ )
  111. If ``true``, the fill percentage is displayed on the bar.
  112. .. rst-class:: classref-section-separator
  113. ----
  114. .. rst-class:: classref-descriptions-group
  115. Theme Property Descriptions
  116. ---------------------------
  117. .. _class_ProgressBar_theme_color_font_color:
  118. .. rst-class:: classref-themeproperty
  119. :ref:`Color<class_Color>` **font_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗<class_ProgressBar_theme_color_font_color>`
  120. The color of the text.
  121. .. rst-class:: classref-item-separator
  122. ----
  123. .. _class_ProgressBar_theme_color_font_outline_color:
  124. .. rst-class:: classref-themeproperty
  125. :ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_ProgressBar_theme_color_font_outline_color>`
  126. The tint of text outline of the **ProgressBar**.
  127. .. rst-class:: classref-item-separator
  128. ----
  129. .. _class_ProgressBar_theme_constant_outline_size:
  130. .. rst-class:: classref-themeproperty
  131. :ref:`int<class_int>` **outline_size** = ``0`` :ref:`🔗<class_ProgressBar_theme_constant_outline_size>`
  132. The size of the text outline.
  133. \ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field<class_FontFile_property_multichannel_signed_distance_field>` enabled, its :ref:`FontFile.msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` must be set to at least *twice* the value of :ref:`outline_size<class_ProgressBar_theme_constant_outline_size>` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.
  134. .. rst-class:: classref-item-separator
  135. ----
  136. .. _class_ProgressBar_theme_font_font:
  137. .. rst-class:: classref-themeproperty
  138. :ref:`Font<class_Font>` **font** :ref:`🔗<class_ProgressBar_theme_font_font>`
  139. Font used to draw the fill percentage if :ref:`show_percentage<class_ProgressBar_property_show_percentage>` is ``true``.
  140. .. rst-class:: classref-item-separator
  141. ----
  142. .. _class_ProgressBar_theme_font_size_font_size:
  143. .. rst-class:: classref-themeproperty
  144. :ref:`int<class_int>` **font_size** :ref:`🔗<class_ProgressBar_theme_font_size_font_size>`
  145. Font size used to draw the fill percentage if :ref:`show_percentage<class_ProgressBar_property_show_percentage>` is ``true``.
  146. .. rst-class:: classref-item-separator
  147. ----
  148. .. _class_ProgressBar_theme_style_background:
  149. .. rst-class:: classref-themeproperty
  150. :ref:`StyleBox<class_StyleBox>` **background** :ref:`🔗<class_ProgressBar_theme_style_background>`
  151. The style of the background.
  152. .. rst-class:: classref-item-separator
  153. ----
  154. .. _class_ProgressBar_theme_style_fill:
  155. .. rst-class:: classref-themeproperty
  156. :ref:`StyleBox<class_StyleBox>` **fill** :ref:`🔗<class_ProgressBar_theme_style_fill>`
  157. The style of the progress (i.e. the part that fills the bar).
  158. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  159. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  160. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  161. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  162. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  163. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  164. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  165. .. |void| replace:: :abbr:`void (No return value.)`