2017-09-12 22:42:36 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-03-01 01:44:37 +01:00
<class name= "TextureProgressBar" inherits= "Range" version= "4.1" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2017-09-12 22:42:36 +02:00
<brief_description >
2017-10-07 09:09:21 +02:00
Texture-based progress bar. Useful for loading screens and life or stamina bars.
2017-09-12 22:42:36 +02:00
</brief_description>
<description >
2020-12-14 21:10:09 +01:00
TextureProgressBar works like [ProgressBar], but uses up to 3 textures instead of Godot's [Theme] resource. It can be used to create horizontal, vertical and radial progress bars.
2017-09-12 22:42:36 +02:00
</description>
<tutorials >
</tutorials>
<methods >
2019-06-27 16:10:09 +02:00
<method name= "get_stretch_margin" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "margin" type= "int" enum= "Side" />
2019-06-27 16:10:09 +02:00
<description >
2022-11-21 03:48:36 +01:00
Returns the stretch margin with the specified index. See [member stretch_margin_bottom] and related properties.
2019-06-27 16:10:09 +02:00
</description>
</method>
<method name= "set_stretch_margin" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "margin" type= "int" enum= "Side" />
<param index= "1" name= "value" type= "int" />
2019-06-27 16:10:09 +02:00
<description >
2022-11-21 03:48:36 +01:00
Sets the stretch margin with the specified index. See [member stretch_margin_bottom] and related properties.
2019-06-27 16:10:09 +02:00
</description>
</method>
2017-09-12 22:42:36 +02:00
</methods>
<members >
2019-06-29 12:38:01 +02:00
<member name= "fill_mode" type= "int" setter= "set_fill_mode" getter= "get_fill_mode" default= "0" >
2019-06-22 01:04:47 +02:00
The fill direction. See [enum FillMode] for possible values.
2017-09-12 22:42:36 +02:00
</member>
2022-11-06 20:27:24 +01:00
<member name= "mouse_filter" type= "int" setter= "set_mouse_filter" getter= "get_mouse_filter" overrides= "Control" enum= "Control.MouseFilter" default= "1" />
2019-06-29 12:38:01 +02:00
<member name= "nine_patch_stretch" type= "bool" setter= "set_nine_patch_stretch" getter= "get_nine_patch_stretch" default= "false" >
2019-09-26 11:46:07 +02:00
If [code]true[/code], Godot treats the bar's textures like in [NinePatchRect]. Use the [code]stretch_margin_*[/code] properties like [member stretch_margin_bottom] to set up the nine patch's 3× 3 grid. When using a radial [member fill_mode], this setting will enable stretching.
2017-09-12 22:42:36 +02:00
</member>
2019-09-24 19:45:03 +02:00
<member name= "radial_center_offset" type= "Vector2" setter= "set_radial_center_offset" getter= "get_radial_center_offset" default= "Vector2(0, 0)" >
2019-06-27 12:34:26 +02:00
Offsets [member texture_progress] if [member fill_mode] is [constant FILL_CLOCKWISE] or [constant FILL_COUNTER_CLOCKWISE].
2017-09-12 22:42:36 +02:00
</member>
2019-06-29 12:38:01 +02:00
<member name= "radial_fill_degrees" type= "float" setter= "set_fill_degrees" getter= "get_fill_degrees" default= "360.0" >
2019-06-27 12:34:26 +02:00
Upper limit for the fill of [member texture_progress] if [member fill_mode] is [constant FILL_CLOCKWISE] or [constant FILL_COUNTER_CLOCKWISE]. When the node's [code]value[/code] is equal to its [code]max_value[/code], the texture fills up to this angle.
2017-10-07 09:09:21 +02:00
See [member Range.value], [member Range.max_value].
2017-09-12 22:42:36 +02:00
</member>
2019-06-29 12:38:01 +02:00
<member name= "radial_initial_angle" type= "float" setter= "set_radial_initial_angle" getter= "get_radial_initial_angle" default= "0.0" >
2019-06-27 12:34:26 +02:00
Starting angle for the fill of [member texture_progress] if [member fill_mode] is [constant FILL_CLOCKWISE] or [constant FILL_COUNTER_CLOCKWISE]. 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].
2017-09-12 22:42:36 +02:00
</member>
2023-06-15 16:06:22 +02:00
<member name= "size_flags_vertical" type= "int" setter= "set_v_size_flags" getter= "get_v_size_flags" overrides= "Control" enum= "Control.SizeFlags" is_bitfield= "true" default= "1" />
2022-11-09 08:59:49 +01:00
<member name= "step" type= "float" setter= "set_step" getter= "get_step" overrides= "Range" default= "1.0" />
2019-06-29 12:38:01 +02:00
<member name= "stretch_margin_bottom" type= "int" setter= "set_stretch_margin" getter= "get_stretch_margin" default= "0" >
2017-10-07 09:09:21 +02:00
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.
2017-09-12 22:42:36 +02:00
</member>
2019-06-29 12:38:01 +02:00
<member name= "stretch_margin_left" type= "int" setter= "set_stretch_margin" getter= "get_stretch_margin" default= "0" >
2017-10-07 09:09:21 +02:00
The width of the 9-patch's left column.
2017-09-12 22:42:36 +02:00
</member>
2019-06-29 12:38:01 +02:00
<member name= "stretch_margin_right" type= "int" setter= "set_stretch_margin" getter= "get_stretch_margin" default= "0" >
2017-10-07 09:09:21 +02:00
The width of the 9-patch's right column.
2017-09-12 22:42:36 +02:00
</member>
2019-06-29 12:38:01 +02:00
<member name= "stretch_margin_top" type= "int" setter= "set_stretch_margin" getter= "get_stretch_margin" default= "0" >
2017-10-07 09:09:21 +02:00
The height of the 9-patch's top row.
2017-09-12 22:42:36 +02:00
</member>
2020-02-12 09:59:06 +01:00
<member name= "texture_over" type= "Texture2D" setter= "set_over_texture" getter= "get_over_texture" >
[Texture2D] that draws over the progress bar. Use it to add highlights or an upper-frame that hides part of [member texture_progress].
2017-09-12 22:42:36 +02:00
</member>
2020-02-12 09:59:06 +01:00
<member name= "texture_progress" type= "Texture2D" setter= "set_progress_texture" getter= "get_progress_texture" >
[Texture2D] 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].
2017-10-07 09:09:21 +02:00
The [code]value[/code] property comes from [Range]. See [member Range.value], [member Range.min_value], [member Range.max_value].
2017-09-12 22:42:36 +02:00
</member>
2021-03-09 22:24:02 +01:00
<member name= "texture_progress_offset" type= "Vector2" setter= "set_texture_progress_offset" getter= "get_texture_progress_offset" default= "Vector2(0, 0)" >
The offset of [member texture_progress]. Useful for [member texture_over] and [member texture_under] with fancy borders, to avoid transparent margins in your progress texture.
</member>
2020-02-12 09:59:06 +01:00
<member name= "texture_under" type= "Texture2D" setter= "set_under_texture" getter= "get_under_texture" >
[Texture2D] that draws under the progress bar. The bar's background.
2017-09-12 22:42:36 +02:00
</member>
2019-09-24 19:45:03 +02:00
<member name= "tint_over" type= "Color" setter= "set_tint_over" getter= "get_tint_over" default= "Color(1, 1, 1, 1)" >
2018-10-04 03:38:18 +02:00
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.
2018-04-10 10:12:42 +02:00
</member>
2019-09-24 19:45:03 +02:00
<member name= "tint_progress" type= "Color" setter= "set_tint_progress" getter= "get_tint_progress" default= "Color(1, 1, 1, 1)" >
2018-10-04 03:38:18 +02:00
Multiplies the color of the bar's [code]texture_progress[/code] texture.
2018-04-10 10:12:42 +02:00
</member>
2019-09-24 19:45:03 +02:00
<member name= "tint_under" type= "Color" setter= "set_tint_under" getter= "get_tint_under" default= "Color(1, 1, 1, 1)" >
2018-10-04 03:38:18 +02:00
Multiplies the color of the bar's [code]texture_under[/code] texture.
2018-04-10 10:12:42 +02:00
</member>
2017-09-12 22:42:36 +02:00
</members>
<constants >
2017-11-24 23:16:30 +01:00
<constant name= "FILL_LEFT_TO_RIGHT" value= "0" enum= "FillMode" >
2017-10-07 09:09:21 +02:00
The [member texture_progress] fills from left to right.
2017-09-12 22:42:36 +02:00
</constant>
2017-11-24 23:16:30 +01:00
<constant name= "FILL_RIGHT_TO_LEFT" value= "1" enum= "FillMode" >
2017-10-07 09:09:21 +02:00
The [member texture_progress] fills from right to left.
2017-09-12 22:42:36 +02:00
</constant>
2017-11-24 23:16:30 +01:00
<constant name= "FILL_TOP_TO_BOTTOM" value= "2" enum= "FillMode" >
2020-01-02 02:08:19 +01:00
The [member texture_progress] fills from top to bottom.
2017-09-12 22:42:36 +02:00
</constant>
2017-11-24 23:16:30 +01:00
<constant name= "FILL_BOTTOM_TO_TOP" value= "3" enum= "FillMode" >
2017-10-07 09:09:21 +02:00
The [member texture_progress] fills from bottom to top.
2017-09-12 22:42:36 +02:00
</constant>
2017-11-24 23:16:30 +01:00
<constant name= "FILL_CLOCKWISE" value= "4" enum= "FillMode" >
2018-10-04 03:38:18 +02:00
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.
2017-09-12 22:42:36 +02:00
</constant>
2017-11-24 23:16:30 +01:00
<constant name= "FILL_COUNTER_CLOCKWISE" value= "5" enum= "FillMode" >
2019-06-22 01:04:47 +02:00
Turns the node into a radial bar. The [member texture_progress] fills counterclockwise. See [member radial_center_offset], [member radial_initial_angle] and [member radial_fill_degrees] to control the way the bar fills up.
2017-09-12 22:42:36 +02:00
</constant>
2018-07-26 11:56:21 +02:00
<constant name= "FILL_BILINEAR_LEFT_AND_RIGHT" value= "6" enum= "FillMode" >
2018-10-04 03:38:18 +02:00
The [member texture_progress] fills from the center, expanding both towards the left and the right.
2018-07-26 11:56:21 +02:00
</constant>
<constant name= "FILL_BILINEAR_TOP_AND_BOTTOM" value= "7" enum= "FillMode" >
2018-10-04 03:38:18 +02:00
The [member texture_progress] fills from the center, expanding both towards the top and the bottom.
2018-07-26 11:56:21 +02:00
</constant>
<constant name= "FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE" value= "8" enum= "FillMode" >
2019-06-22 01:04:47 +02:00
Turns the node into a radial bar. The [member texture_progress] fills radially from the center, expanding both clockwise and counterclockwise. See [member radial_center_offset], [member radial_initial_angle] and [member radial_fill_degrees] to control the way the bar fills up.
2018-07-26 11:56:21 +02:00
</constant>
2017-09-12 22:42:36 +02:00
</constants>
</class>