class_progressbar.rst 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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. General-purpose progress bar.
  11. Description
  12. -----------
  13. General-purpose progress bar. Shows fill percentage from right to left.
  14. Properties
  15. ----------
  16. +-------------------------+--------------------------------------------------------------------+----------+
  17. | :ref:`int<class_int>` | :ref:`fill_mode<class_ProgressBar_property_fill_mode>` | ``0`` |
  18. +-------------------------+--------------------------------------------------------------------+----------+
  19. | :ref:`bool<class_bool>` | :ref:`percent_visible<class_ProgressBar_property_percent_visible>` | ``true`` |
  20. +-------------------------+--------------------------------------------------------------------+----------+
  21. Theme Properties
  22. ----------------
  23. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  24. | :ref:`Color<class_Color>` | :ref:`font_color<class_ProgressBar_theme_color_font_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
  25. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  26. | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_ProgressBar_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` |
  27. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  28. | :ref:`Color<class_Color>` | :ref:`font_shadow_color<class_ProgressBar_theme_color_font_shadow_color>` | ``Color(0, 0, 0, 1)`` |
  29. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  30. | :ref:`int<class_int>` | :ref:`outline_size<class_ProgressBar_theme_constant_outline_size>` | ``0`` |
  31. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  32. | :ref:`Font<class_Font>` | :ref:`font<class_ProgressBar_theme_font_font>` | |
  33. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  34. | :ref:`int<class_int>` | :ref:`font_size<class_ProgressBar_theme_font_size_font_size>` | |
  35. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  36. | :ref:`StyleBox<class_StyleBox>` | :ref:`bg<class_ProgressBar_theme_style_bg>` | |
  37. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  38. | :ref:`StyleBox<class_StyleBox>` | :ref:`fg<class_ProgressBar_theme_style_fg>` | |
  39. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  40. Enumerations
  41. ------------
  42. .. _enum_ProgressBar_FillMode:
  43. .. _class_ProgressBar_constant_FILL_BEGIN_TO_END:
  44. .. _class_ProgressBar_constant_FILL_END_TO_BEGIN:
  45. .. _class_ProgressBar_constant_FILL_TOP_TO_BOTTOM:
  46. .. _class_ProgressBar_constant_FILL_BOTTOM_TO_TOP:
  47. enum **FillMode**:
  48. - **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.
  49. - **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.
  50. - **FILL_TOP_TO_BOTTOM** = **2** --- The progress fills from top to bottom.
  51. - **FILL_BOTTOM_TO_TOP** = **3** --- The progress fills from bottom to top.
  52. Property Descriptions
  53. ---------------------
  54. .. _class_ProgressBar_property_fill_mode:
  55. - :ref:`int<class_int>` **fill_mode**
  56. +-----------+----------------------+
  57. | *Default* | ``0`` |
  58. +-----------+----------------------+
  59. | *Setter* | set_fill_mode(value) |
  60. +-----------+----------------------+
  61. | *Getter* | get_fill_mode() |
  62. +-----------+----------------------+
  63. The fill direction. See :ref:`FillMode<enum_ProgressBar_FillMode>` for possible values.
  64. ----
  65. .. _class_ProgressBar_property_percent_visible:
  66. - :ref:`bool<class_bool>` **percent_visible**
  67. +-----------+----------------------------+
  68. | *Default* | ``true`` |
  69. +-----------+----------------------------+
  70. | *Setter* | set_percent_visible(value) |
  71. +-----------+----------------------------+
  72. | *Getter* | is_percent_visible() |
  73. +-----------+----------------------------+
  74. If ``true``, the fill percentage is displayed on the bar.
  75. Theme Property Descriptions
  76. ---------------------------
  77. .. _class_ProgressBar_theme_color_font_color:
  78. - :ref:`Color<class_Color>` **font_color**
  79. +-----------+--------------------------------+
  80. | *Default* | ``Color(0.95, 0.95, 0.95, 1)`` |
  81. +-----------+--------------------------------+
  82. The color of the text.
  83. ----
  84. .. _class_ProgressBar_theme_color_font_outline_color:
  85. - :ref:`Color<class_Color>` **font_outline_color**
  86. +-----------+-----------------------+
  87. | *Default* | ``Color(1, 1, 1, 1)`` |
  88. +-----------+-----------------------+
  89. The tint of text outline of the ``ProgressBar``.
  90. ----
  91. .. _class_ProgressBar_theme_color_font_shadow_color:
  92. - :ref:`Color<class_Color>` **font_shadow_color**
  93. +-----------+-----------------------+
  94. | *Default* | ``Color(0, 0, 0, 1)`` |
  95. +-----------+-----------------------+
  96. The color of the text's shadow.
  97. ----
  98. .. _class_ProgressBar_theme_constant_outline_size:
  99. - :ref:`int<class_int>` **outline_size**
  100. +-----------+-------+
  101. | *Default* | ``0`` |
  102. +-----------+-------+
  103. The size of the text outline.
  104. ----
  105. .. _class_ProgressBar_theme_font_font:
  106. - :ref:`Font<class_Font>` **font**
  107. Font used to draw the fill percentage if :ref:`percent_visible<class_ProgressBar_property_percent_visible>` is ``true``.
  108. ----
  109. .. _class_ProgressBar_theme_font_size_font_size:
  110. - :ref:`int<class_int>` **font_size**
  111. Font size used to draw the fill percentage if :ref:`percent_visible<class_ProgressBar_property_percent_visible>` is ``true``.
  112. ----
  113. .. _class_ProgressBar_theme_style_bg:
  114. - :ref:`StyleBox<class_StyleBox>` **bg**
  115. The style of the background.
  116. ----
  117. .. _class_ProgressBar_theme_style_fg:
  118. - :ref:`StyleBox<class_StyleBox>` **fg**
  119. The style of the progress (i.e. the part that fills the bar).
  120. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  121. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  122. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  123. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  124. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  125. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`