Class StyleBoxTexture
A texture-based nine-patch StyleBox.
- Inheritance
-
StyleBoxTexture
Remarks
A 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.
Properties
axis_stretch_horizontal
Controls how the stylebox's texture will be stretched or tiled horizontally. See AxisStretchMode for possible values.
var axis_stretch_horizontal : int = 0
Property Value
Remarks
axis_stretch_vertical
Controls how the stylebox's texture will be stretched or tiled vertically. See AxisStretchMode for possible values.
var axis_stretch_vertical : int = 0
Property Value
Remarks
draw_center
If true
, the nine-patch texture's center tile will be drawn.
var draw_center : bool = true
Property Value
Remarks
expand_margin_bottom
Expands the bottom margin of this style box when drawing, causing it to be drawn larger than requested.
var expand_margin_bottom : float = 0.0
Property Value
Remarks
expand_margin_left
Expands the left margin of this style box when drawing, causing it to be drawn larger than requested.
var expand_margin_left : float = 0.0
Property Value
Remarks
expand_margin_right
Expands the right margin of this style box when drawing, causing it to be drawn larger than requested.
var expand_margin_right : float = 0.0
Property Value
Remarks
expand_margin_top
Expands the top margin of this style box when drawing, causing it to be drawn larger than requested.
var expand_margin_top : float = 0.0
Property Value
Remarks
modulate_color
Modulates the color of the texture when this style box is drawn.
var modulate_color : Color = Color(1, 1, 1, 1)
Property Value
Remarks
region_rect
The region to use from the texture.
This is equivalent to first wrapping the texture in an AtlasTexture with the same region.
If empty (Rect2(0, 0, 0, 0)
), the whole texture is used.
var region_rect : Rect2 = Rect2(0, 0, 0, 0)
Property Value
Remarks
texture
The texture to use when drawing this style box.
var texture : Texture2D
Property Value
Remarks
texture_margin_bottom
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.
This is also the value used as fallback for content_margin_bottom if it is negative.
var texture_margin_bottom : float = 0.0
Property Value
Remarks
texture_margin_left
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.
This is also the value used as fallback for content_margin_left if it is negative.
var texture_margin_left : float = 0.0
Property Value
Remarks
texture_margin_right
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.
This is also the value used as fallback for content_margin_right if it is negative.
var texture_margin_right : float = 0.0
Property Value
Remarks
texture_margin_top
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.
This is also the value used as fallback for content_margin_top if it is negative.
var texture_margin_top : float = 0.0
Property Value
Remarks
Methods
get_expand_margin(int)
Qualifiers: const
Returns the expand margin size of the specified Side.
float get_expand_margin(int margin)
Parameters
margin
int
get_texture_margin(int)
Qualifiers: const
Returns the margin size of the specified Side.
float get_texture_margin(int margin)
Parameters
margin
int
set_expand_margin(int, float)
Sets the expand margin to size
pixels for the specified Side.
void set_expand_margin(int margin, float size)
Parameters
set_expand_margin_all(float)
Sets the expand margin to size
pixels for all sides.
void set_expand_margin_all(float size)
Parameters
size
float
set_texture_margin(int, float)
Sets the margin to size
pixels for the specified Side.
void set_texture_margin(int margin, float size)
Parameters
set_texture_margin_all(float)
Sets the margin to size
pixels for all sides.
void set_texture_margin_all(float size)
Parameters
size
float