2017-09-12 20:42:36 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2021-11-05 14:02:42 +00:00
<class name= "StyleBoxTexture" inherits= "StyleBox" version= "3.5" >
2017-09-12 20:42:36 +00:00
<brief_description >
2019-06-21 23:04:47 +00:00
Texture-based nine-patch [StyleBox].
2017-09-12 20:42:36 +00:00
</brief_description>
<description >
2019-06-21 23:04:47 +00:00
Texture-based nine-patch [StyleBox], in a way similar to [NinePatchRect]. This stylebox performs a 3× 3 scaling of a texture, where only the center cell is fully stretched. This makes it possible to design bordered styles regardless of the stylebox's size.
2017-09-12 20:42:36 +00:00
</description>
<tutorials >
</tutorials>
<methods >
2019-06-27 14:10:09 +00:00
<method name= "get_expand_margin_size" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "float" />
<argument index= "0" name= "margin" type= "int" enum= "Margin" />
2019-06-27 14:10:09 +00:00
<description >
2019-12-03 14:46:11 +00:00
Returns the size of the given [code]margin[/code]'s expand margin. See [enum Margin] for possible values.
2019-06-27 14:10:09 +00:00
</description>
</method>
<method name= "get_margin_size" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "float" />
<argument index= "0" name= "margin" type= "int" enum= "Margin" />
2019-06-27 14:10:09 +00:00
<description >
2019-12-03 14:46:11 +00:00
Returns the size of the given [code]margin[/code]. See [enum Margin] for possible values.
2019-06-27 14:10:09 +00:00
</description>
</method>
2017-09-12 20:42:36 +00:00
<method name= "set_expand_margin_all" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
<argument index= "0" name= "size" type= "float" />
2017-09-12 20:42:36 +00:00
<description >
2019-12-03 14:46:11 +00:00
Sets the expand margin to [code]size[/code] pixels for all margins.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "set_expand_margin_individual" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
<argument index= "0" name= "size_left" type= "float" />
<argument index= "1" name= "size_top" type= "float" />
<argument index= "2" name= "size_right" type= "float" />
<argument index= "3" name= "size_bottom" type= "float" />
2017-09-12 20:42:36 +00:00
<description >
2019-12-03 14:46:11 +00:00
Sets the expand margin for each margin to [code]size_left[/code], [code]size_top[/code], [code]size_right[/code], and [code]size_bottom[/code] pixels.
2017-09-12 20:42:36 +00:00
</description>
</method>
2019-06-27 14:10:09 +00:00
<method name= "set_expand_margin_size" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
<argument index= "0" name= "margin" type= "int" enum= "Margin" />
<argument index= "1" name= "size" type= "float" />
2019-06-27 14:10:09 +00:00
<description >
2019-12-03 14:46:11 +00:00
Sets the expand margin to [code]size[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values.
2019-06-27 14:10:09 +00:00
</description>
</method>
<method name= "set_margin_size" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
<argument index= "0" name= "margin" type= "int" enum= "Margin" />
<argument index= "1" name= "size" type= "float" />
2019-06-27 14:10:09 +00:00
<description >
2019-12-03 14:46:11 +00:00
Sets the margin to [code]size[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values.
2019-06-27 14:10:09 +00:00
</description>
</method>
2017-09-12 20:42:36 +00:00
</methods>
<members >
2019-06-29 10:38:01 +00:00
<member name= "axis_stretch_horizontal" type= "int" setter= "set_h_axis_stretch_mode" getter= "get_h_axis_stretch_mode" enum= "StyleBoxTexture.AxisStretchMode" default= "0" >
2019-12-03 14:46:11 +00:00
Controls how the stylebox's texture will be stretched or tiled horizontally. See [enum AxisStretchMode] for possible values.
2017-09-12 20:42:36 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "axis_stretch_vertical" type= "int" setter= "set_v_axis_stretch_mode" getter= "get_v_axis_stretch_mode" enum= "StyleBoxTexture.AxisStretchMode" default= "0" >
2019-12-03 14:46:11 +00:00
Controls how the stylebox's texture will be stretched or tiled vertically. See [enum AxisStretchMode] for possible values.
2017-09-12 20:42:36 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "draw_center" type= "bool" setter= "set_draw_center" getter= "is_draw_center_enabled" default= "true" >
2019-12-03 14:46:11 +00:00
If [code]true[/code], the nine-patch texture's center tile will be drawn.
2017-09-12 20:42:36 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "expand_margin_bottom" type= "float" setter= "set_expand_margin_size" getter= "get_expand_margin_size" default= "0.0" >
2019-06-21 23:04:47 +00:00
Expands the bottom margin of this style box when drawing, causing it to be drawn larger than requested.
2017-09-12 20:42:36 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "expand_margin_left" type= "float" setter= "set_expand_margin_size" getter= "get_expand_margin_size" default= "0.0" >
2019-06-21 23:04:47 +00:00
Expands the left margin of this style box when drawing, causing it to be drawn larger than requested.
2017-09-12 20:42:36 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "expand_margin_right" type= "float" setter= "set_expand_margin_size" getter= "get_expand_margin_size" default= "0.0" >
2019-06-21 23:04:47 +00:00
Expands the right margin of this style box when drawing, causing it to be drawn larger than requested.
2017-09-12 20:42:36 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "expand_margin_top" type= "float" setter= "set_expand_margin_size" getter= "get_expand_margin_size" default= "0.0" >
2019-06-21 23:04:47 +00:00
Expands the top margin of this style box when drawing, causing it to be drawn larger than requested.
2017-09-12 20:42:36 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "margin_bottom" type= "float" setter= "set_margin_size" getter= "get_margin_size" default= "0.0" >
2019-06-21 23:04:47 +00:00
Increases the bottom margin of the 3× 3 texture box.
A higher value means more of the source texture is considered to be part of the bottom border of the 3× 3 box.
2019-02-06 16:18:02 +00:00
This is also the value used as fallback for [member StyleBox.content_margin_bottom] if it is negative.
2017-09-12 20:42:36 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "margin_left" type= "float" setter= "set_margin_size" getter= "get_margin_size" default= "0.0" >
2019-06-21 23:04:47 +00:00
Increases the left margin of the 3× 3 texture box.
A higher value means more of the source texture is considered to be part of the left border of the 3× 3 box.
2019-02-06 16:18:02 +00:00
This is also the value used as fallback for [member StyleBox.content_margin_left] if it is negative.
2017-09-12 20:42:36 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "margin_right" type= "float" setter= "set_margin_size" getter= "get_margin_size" default= "0.0" >
2019-06-21 23:04:47 +00:00
Increases the right margin of the 3× 3 texture box.
A higher value means more of the source texture is considered to be part of the right border of the 3× 3 box.
2019-02-06 16:18:02 +00:00
This is also the value used as fallback for [member StyleBox.content_margin_right] if it is negative.
2017-09-12 20:42:36 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "margin_top" type= "float" setter= "set_margin_size" getter= "get_margin_size" default= "0.0" >
2019-06-21 23:04:47 +00:00
Increases the top margin of the 3× 3 texture box.
A higher value means more of the source texture is considered to be part of the top border of the 3× 3 box.
2019-02-06 16:18:02 +00:00
This is also the value used as fallback for [member StyleBox.content_margin_top] if it is negative.
2017-09-12 20:42:36 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "modulate_color" type= "Color" setter= "set_modulate" getter= "get_modulate" default= "Color( 1, 1, 1, 1 )" >
2019-02-06 16:18:02 +00:00
Modulates the color of the texture when this style box is drawn.
2017-09-12 20:42:36 +00:00
</member>
2019-07-15 18:42:47 +00:00
<member name= "normal_map" type= "Texture" setter= "set_normal_map" getter= "get_normal_map" >
2019-02-06 16:18:02 +00:00
The normal map to use when drawing this style box.
2020-05-04 20:18:05 +00:00
[b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
2017-09-12 20:42:36 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "region_rect" type= "Rect2" setter= "set_region_rect" getter= "get_region_rect" default= "Rect2( 0, 0, 0, 0 )" >
2019-12-03 14:46:11 +00:00
Species a sub-region of the texture to use.
2019-02-06 16:18:02 +00:00
This is equivalent to first wrapping the texture in an [AtlasTexture] with the same region.
2017-09-12 20:42:36 +00:00
</member>
2019-07-15 18:42:47 +00:00
<member name= "texture" type= "Texture" setter= "set_texture" getter= "get_texture" >
2019-02-06 16:18:02 +00:00
The texture to use when drawing this style box.
2017-09-12 20:42:36 +00:00
</member>
</members>
<signals >
<signal name= "texture_changed" >
<description >
2019-12-03 14:46:11 +00:00
Emitted when the stylebox's texture is changed.
2017-09-12 20:42:36 +00:00
</description>
</signal>
</signals>
<constants >
2017-11-24 22:16:30 +00:00
<constant name= "AXIS_STRETCH_MODE_STRETCH" value= "0" enum= "AxisStretchMode" >
2019-12-03 14:46:11 +00:00
Stretch the stylebox's texture. This results in visible distortion unless the texture size matches the stylebox's size perfectly.
2017-09-12 20:42:36 +00:00
</constant>
2017-11-24 22:16:30 +00:00
<constant name= "AXIS_STRETCH_MODE_TILE" value= "1" enum= "AxisStretchMode" >
2019-12-03 14:46:11 +00:00
Repeats the stylebox's texture to match the stylebox's size according to the nine-patch system.
2017-09-12 20:42:36 +00:00
</constant>
2017-11-24 22:16:30 +00:00
<constant name= "AXIS_STRETCH_MODE_TILE_FIT" value= "2" enum= "AxisStretchMode" >
2019-12-03 14:46:11 +00:00
Repeats the stylebox's texture to match the stylebox's size according to the nine-patch system. Unlike [constant AXIS_STRETCH_MODE_TILE], the texture may be slightly stretched to make the nine-patch texture tile seamlessly.
2017-09-12 20:42:36 +00:00
</constant>
</constants>
</class>