class_progressbar.rst 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the ProgressBar.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_ProgressBar:
  6. ProgressBar
  7. ===========
  8. **Inherits:** :ref:`Range<class_Range>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. General-purpose progress bar.
  10. Description
  11. -----------
  12. General-purpose progress bar. Shows fill percentage from right to left.
  13. Properties
  14. ----------
  15. +---------------------------+--------------------------------------------------------------------+------------------------------------------------------------------------------+
  16. | :ref:`bool<class_bool>` | :ref:`percent_visible<class_ProgressBar_property_percent_visible>` | ``true`` |
  17. +---------------------------+--------------------------------------------------------------------+------------------------------------------------------------------------------+
  18. | :ref:`int<class_int>` | size_flags_vertical | ``0`` (overrides :ref:`Control<class_Control_property_size_flags_vertical>`) |
  19. +---------------------------+--------------------------------------------------------------------+------------------------------------------------------------------------------+
  20. | :ref:`float<class_float>` | step | ``0.01`` (overrides :ref:`Range<class_Range_property_step>`) |
  21. +---------------------------+--------------------------------------------------------------------+------------------------------------------------------------------------------+
  22. Theme Properties
  23. ----------------
  24. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  25. | :ref:`Color<class_Color>` | :ref:`font_color<class_ProgressBar_theme_color_font_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
  26. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  27. | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_ProgressBar_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` |
  28. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  29. | :ref:`Color<class_Color>` | :ref:`font_shadow_color<class_ProgressBar_theme_color_font_shadow_color>` | ``Color(0, 0, 0, 1)`` |
  30. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  31. | :ref:`int<class_int>` | :ref:`outline_size<class_ProgressBar_theme_constant_outline_size>` | ``0`` |
  32. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  33. | :ref:`Font<class_Font>` | :ref:`font<class_ProgressBar_theme_font_font>` | |
  34. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  35. | :ref:`int<class_int>` | :ref:`font_size<class_ProgressBar_theme_font_size_font_size>` | |
  36. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  37. | :ref:`StyleBox<class_StyleBox>` | :ref:`bg<class_ProgressBar_theme_style_bg>` | |
  38. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  39. | :ref:`StyleBox<class_StyleBox>` | :ref:`fg<class_ProgressBar_theme_style_fg>` | |
  40. +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+
  41. Property Descriptions
  42. ---------------------
  43. .. _class_ProgressBar_property_percent_visible:
  44. - :ref:`bool<class_bool>` **percent_visible**
  45. +-----------+----------------------------+
  46. | *Default* | ``true`` |
  47. +-----------+----------------------------+
  48. | *Setter* | set_percent_visible(value) |
  49. +-----------+----------------------------+
  50. | *Getter* | is_percent_visible() |
  51. +-----------+----------------------------+
  52. If ``true``, the fill percentage is displayed on the bar.
  53. Theme Property Descriptions
  54. ---------------------------
  55. .. _class_ProgressBar_theme_color_font_color:
  56. - :ref:`Color<class_Color>` **font_color**
  57. +-----------+--------------------------------+
  58. | *Default* | ``Color(0.95, 0.95, 0.95, 1)`` |
  59. +-----------+--------------------------------+
  60. The color of the text.
  61. ----
  62. .. _class_ProgressBar_theme_color_font_outline_color:
  63. - :ref:`Color<class_Color>` **font_outline_color**
  64. +-----------+-----------------------+
  65. | *Default* | ``Color(1, 1, 1, 1)`` |
  66. +-----------+-----------------------+
  67. The tint of text outline of the ``ProgressBar``.
  68. ----
  69. .. _class_ProgressBar_theme_color_font_shadow_color:
  70. - :ref:`Color<class_Color>` **font_shadow_color**
  71. +-----------+-----------------------+
  72. | *Default* | ``Color(0, 0, 0, 1)`` |
  73. +-----------+-----------------------+
  74. The color of the text's shadow.
  75. ----
  76. .. _class_ProgressBar_theme_constant_outline_size:
  77. - :ref:`int<class_int>` **outline_size**
  78. +-----------+-------+
  79. | *Default* | ``0`` |
  80. +-----------+-------+
  81. The size of the text outline.
  82. ----
  83. .. _class_ProgressBar_theme_font_font:
  84. - :ref:`Font<class_Font>` **font**
  85. Font used to draw the fill percentage if :ref:`percent_visible<class_ProgressBar_property_percent_visible>` is ``true``.
  86. ----
  87. .. _class_ProgressBar_theme_font_size_font_size:
  88. - :ref:`int<class_int>` **font_size**
  89. Font size used to draw the fill percentage if :ref:`percent_visible<class_ProgressBar_property_percent_visible>` is ``true``.
  90. ----
  91. .. _class_ProgressBar_theme_style_bg:
  92. - :ref:`StyleBox<class_StyleBox>` **bg**
  93. The style of the background.
  94. ----
  95. .. _class_ProgressBar_theme_style_fg:
  96. - :ref:`StyleBox<class_StyleBox>` **fg**
  97. The style of the progress (i.e. the part that fills the bar).
  98. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  99. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  100. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  101. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  102. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  103. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`