2
0

class_progressbar.rst 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  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/4.2/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.2/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:`int<class_int>` | :ref:`fill_mode<class_ProgressBar_property_fill_mode>` | ``0`` |
  22. +-------------------------+--------------------------------------------------------------------+----------+
  23. | :ref:`bool<class_bool>` | :ref:`show_percentage<class_ProgressBar_property_show_percentage>` | ``true`` |
  24. +-------------------------+--------------------------------------------------------------------+----------+
  25. .. rst-class:: classref-reftable-group
  26. Theme Properties
  27. ----------------
  28. .. table::
  29. :widths: auto
  30. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  31. | :ref:`Color<class_Color>` | :ref:`font_color<class_ProgressBar_theme_color_font_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
  32. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  33. | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_ProgressBar_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` |
  34. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  35. | :ref:`int<class_int>` | :ref:`outline_size<class_ProgressBar_theme_constant_outline_size>` | ``0`` |
  36. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  37. | :ref:`Font<class_Font>` | :ref:`font<class_ProgressBar_theme_font_font>` | |
  38. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  39. | :ref:`int<class_int>` | :ref:`font_size<class_ProgressBar_theme_font_size_font_size>` | |
  40. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  41. | :ref:`StyleBox<class_StyleBox>` | :ref:`background<class_ProgressBar_theme_style_background>` | |
  42. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  43. | :ref:`StyleBox<class_StyleBox>` | :ref:`fill<class_ProgressBar_theme_style_fill>` | |
  44. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  45. .. rst-class:: classref-section-separator
  46. ----
  47. .. rst-class:: classref-descriptions-group
  48. Enumerations
  49. ------------
  50. .. _enum_ProgressBar_FillMode:
  51. .. rst-class:: classref-enumeration
  52. enum **FillMode**:
  53. .. _class_ProgressBar_constant_FILL_BEGIN_TO_END:
  54. .. rst-class:: classref-enumeration-constant
  55. :ref:`FillMode<enum_ProgressBar_FillMode>` **FILL_BEGIN_TO_END** = ``0``
  56. 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.
  57. .. _class_ProgressBar_constant_FILL_END_TO_BEGIN:
  58. .. rst-class:: classref-enumeration-constant
  59. :ref:`FillMode<enum_ProgressBar_FillMode>` **FILL_END_TO_BEGIN** = ``1``
  60. 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.
  61. .. _class_ProgressBar_constant_FILL_TOP_TO_BOTTOM:
  62. .. rst-class:: classref-enumeration-constant
  63. :ref:`FillMode<enum_ProgressBar_FillMode>` **FILL_TOP_TO_BOTTOM** = ``2``
  64. The progress fills from top to bottom.
  65. .. _class_ProgressBar_constant_FILL_BOTTOM_TO_TOP:
  66. .. rst-class:: classref-enumeration-constant
  67. :ref:`FillMode<enum_ProgressBar_FillMode>` **FILL_BOTTOM_TO_TOP** = ``3``
  68. The progress fills from bottom to top.
  69. .. rst-class:: classref-section-separator
  70. ----
  71. .. rst-class:: classref-descriptions-group
  72. Property Descriptions
  73. ---------------------
  74. .. _class_ProgressBar_property_fill_mode:
  75. .. rst-class:: classref-property
  76. :ref:`int<class_int>` **fill_mode** = ``0``
  77. .. rst-class:: classref-property-setget
  78. - void **set_fill_mode** **(** :ref:`int<class_int>` value **)**
  79. - :ref:`int<class_int>` **get_fill_mode** **(** **)**
  80. The fill direction. See :ref:`FillMode<enum_ProgressBar_FillMode>` for possible values.
  81. .. rst-class:: classref-item-separator
  82. ----
  83. .. _class_ProgressBar_property_show_percentage:
  84. .. rst-class:: classref-property
  85. :ref:`bool<class_bool>` **show_percentage** = ``true``
  86. .. rst-class:: classref-property-setget
  87. - void **set_show_percentage** **(** :ref:`bool<class_bool>` value **)**
  88. - :ref:`bool<class_bool>` **is_percentage_shown** **(** **)**
  89. If ``true``, the fill percentage is displayed on the bar.
  90. .. rst-class:: classref-section-separator
  91. ----
  92. .. rst-class:: classref-descriptions-group
  93. Theme Property Descriptions
  94. ---------------------------
  95. .. _class_ProgressBar_theme_color_font_color:
  96. .. rst-class:: classref-themeproperty
  97. :ref:`Color<class_Color>` **font_color** = ``Color(0.95, 0.95, 0.95, 1)``
  98. The color of the text.
  99. .. rst-class:: classref-item-separator
  100. ----
  101. .. _class_ProgressBar_theme_color_font_outline_color:
  102. .. rst-class:: classref-themeproperty
  103. :ref:`Color<class_Color>` **font_outline_color** = ``Color(1, 1, 1, 1)``
  104. The tint of text outline of the **ProgressBar**.
  105. .. rst-class:: classref-item-separator
  106. ----
  107. .. _class_ProgressBar_theme_constant_outline_size:
  108. .. rst-class:: classref-themeproperty
  109. :ref:`int<class_int>` **outline_size** = ``0``
  110. The size of the text outline.
  111. \ **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.
  112. .. rst-class:: classref-item-separator
  113. ----
  114. .. _class_ProgressBar_theme_font_font:
  115. .. rst-class:: classref-themeproperty
  116. :ref:`Font<class_Font>` **font**
  117. Font used to draw the fill percentage if :ref:`show_percentage<class_ProgressBar_property_show_percentage>` is ``true``.
  118. .. rst-class:: classref-item-separator
  119. ----
  120. .. _class_ProgressBar_theme_font_size_font_size:
  121. .. rst-class:: classref-themeproperty
  122. :ref:`int<class_int>` **font_size**
  123. Font size used to draw the fill percentage if :ref:`show_percentage<class_ProgressBar_property_show_percentage>` is ``true``.
  124. .. rst-class:: classref-item-separator
  125. ----
  126. .. _class_ProgressBar_theme_style_background:
  127. .. rst-class:: classref-themeproperty
  128. :ref:`StyleBox<class_StyleBox>` **background**
  129. The style of the background.
  130. .. rst-class:: classref-item-separator
  131. ----
  132. .. _class_ProgressBar_theme_style_fill:
  133. .. rst-class:: classref-themeproperty
  134. :ref:`StyleBox<class_StyleBox>` **fill**
  135. The style of the progress (i.e. the part that fills the bar).
  136. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  137. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  138. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  139. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  140. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  141. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  142. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`