TextureProgress.xml 6.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="TextureProgress" inherits="Range" category="Core" version="3.1">
  3. <brief_description>
  4. Texture-based progress bar. Useful for loading screens and life or stamina bars.
  5. </brief_description>
  6. <description>
  7. TextureProgress works like [ProgressBar] but it uses up to 3 textures instead of Godot's [Theme] resource. Works horizontally, vertically, and radially.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. </methods>
  15. <members>
  16. <member name="fill_mode" type="int" setter="set_fill_mode" getter="get_fill_mode">
  17. The fill direction. Uses FILL_* constants.
  18. </member>
  19. <member name="nine_patch_stretch" type="bool" setter="set_nine_patch_stretch" getter="get_nine_patch_stretch">
  20. If [code]true[/code], Godot treats the bar's textures like [NinePatchRect]. Use [code]stretch_margin_*[/code], like [member stretch_margin_bottom], to set up the nine patch's 3x3 grid. Default value: [code]false[/code].
  21. </member>
  22. <member name="radial_center_offset" type="Vector2" setter="set_radial_center_offset" getter="get_radial_center_offset">
  23. Offsets [member texture_progress] if [member fill_mode] is [code]FILL_CLOCKWISE[/code] or [code]FILL_COUNTER_CLOCKWISE[/code].
  24. </member>
  25. <member name="radial_fill_degrees" type="float" setter="set_fill_degrees" getter="get_fill_degrees">
  26. Upper limit for the fill of [member texture_progress] if [member fill_mode] is [code]FILL_CLOCKWISE[/code] or [code]FILL_COUNTER_CLOCKWISE[/code]. When the node's [code]value[/code] is equal to its [code]max_value[/code], the texture fills up to this angle.
  27. See [member Range.value], [member Range.max_value].
  28. </member>
  29. <member name="radial_initial_angle" type="float" setter="set_radial_initial_angle" getter="get_radial_initial_angle">
  30. Starting angle for the fill of [member texture_progress] if [member fill_mode] is [code]FILL_CLOCKWISE[/code] or [code]FILL_COUNTER_CLOCKWISE[/code]. When the node's [code]value[/code] is equal to its [code]min_value[/code], the texture doesn't show up at all. When the [code]value[/code] increases, the texture fills and tends towards [member radial_fill_degrees].
  31. </member>
  32. <member name="stretch_margin_bottom" type="int" setter="set_stretch_margin" getter="get_stretch_margin">
  33. The height of the 9-patch's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders.
  34. </member>
  35. <member name="stretch_margin_left" type="int" setter="set_stretch_margin" getter="get_stretch_margin">
  36. The width of the 9-patch's left column.
  37. </member>
  38. <member name="stretch_margin_right" type="int" setter="set_stretch_margin" getter="get_stretch_margin">
  39. The width of the 9-patch's right column.
  40. </member>
  41. <member name="stretch_margin_top" type="int" setter="set_stretch_margin" getter="get_stretch_margin">
  42. The height of the 9-patch's top row.
  43. </member>
  44. <member name="texture_over" type="Texture" setter="set_over_texture" getter="get_over_texture">
  45. [Texture] that draws over the progress bar. Use it to add highlights or an upper-frame that hides part of [member texture_progress].
  46. </member>
  47. <member name="texture_progress" type="Texture" setter="set_progress_texture" getter="get_progress_texture">
  48. [Texture] that clips based on the node's [code]value[/code] and [member fill_mode]. As [code]value[/code] increased, the texture fills up. It shows entirely when [code]value[/code] reaches [code]max_value[/code]. It doesn't show at all if [code]value[/code] is equal to [code]min_value[/code].
  49. The [code]value[/code] property comes from [Range]. See [member Range.value], [member Range.min_value], [member Range.max_value].
  50. </member>
  51. <member name="texture_under" type="Texture" setter="set_under_texture" getter="get_under_texture">
  52. [Texture] that draws under the progress bar. The bar's background.
  53. </member>
  54. <member name="tint_over" type="Color" setter="set_tint_over" getter="get_tint_over">
  55. Multiplies the color of the bar's [code]texture_over[/code] texture. The effect is similar to [member CanvasItem.modulate], except it only affects this specific texture instead of the entire node.
  56. </member>
  57. <member name="tint_progress" type="Color" setter="set_tint_progress" getter="get_tint_progress">
  58. Multiplies the color of the bar's [code]texture_progress[/code] texture.
  59. </member>
  60. <member name="tint_under" type="Color" setter="set_tint_under" getter="get_tint_under">
  61. Multiplies the color of the bar's [code]texture_under[/code] texture.
  62. </member>
  63. </members>
  64. <constants>
  65. <constant name="FILL_LEFT_TO_RIGHT" value="0" enum="FillMode">
  66. The [member texture_progress] fills from left to right.
  67. </constant>
  68. <constant name="FILL_RIGHT_TO_LEFT" value="1" enum="FillMode">
  69. The [member texture_progress] fills from right to left.
  70. </constant>
  71. <constant name="FILL_TOP_TO_BOTTOM" value="2" enum="FillMode">
  72. The [member texture_progress] fills from top to bototm.
  73. </constant>
  74. <constant name="FILL_BOTTOM_TO_TOP" value="3" enum="FillMode">
  75. The [member texture_progress] fills from bottom to top.
  76. </constant>
  77. <constant name="FILL_CLOCKWISE" value="4" enum="FillMode">
  78. Turns the node into a radial bar. The [member texture_progress] fills clockwise. See [member radial_center_offset], [member radial_initial_angle] and [member radial_fill_degrees] to control the way the bar fills up.
  79. </constant>
  80. <constant name="FILL_COUNTER_CLOCKWISE" value="5" enum="FillMode">
  81. Turns the node into a radial bar. The [member texture_progress] fills counter-clockwise. See [member radial_center_offset], [member radial_initial_angle] and [member radial_fill_degrees] to control the way the bar fills up.
  82. </constant>
  83. <constant name="FILL_BILINEAR_LEFT_AND_RIGHT" value="6" enum="FillMode">
  84. The [member texture_progress] fills from the center, expanding both towards the left and the right.
  85. </constant>
  86. <constant name="FILL_BILINEAR_TOP_AND_BOTTOM" value="7" enum="FillMode">
  87. The [member texture_progress] fills from the center, expanding both towards the top and the bottom.
  88. </constant>
  89. <constant name="FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE" value="8" enum="FillMode">
  90. Turns the node into a radial bar. The [member texture_progress] fills radially from the center, expanding both clockwise and counter-clockwise. See [member radial_center_offset], [member radial_initial_angle] and [member radial_fill_degrees] to control the way the bar fills up.
  91. </constant>
  92. </constants>
  93. </class>