StyleBoxTexture¶
Inherits: StyleBox < Resource < Reference < Object
Category: Core
Brief Description¶
Texture Based 3x3 scale style.
Properties¶
Methods¶
| void | set_expand_margin_all ( float size ) |
| void | set_expand_margin_individual ( float size_left, float size_top, float size_right, float size_bottom ) |
Signals¶
- texture_changed ( )
Enumerations¶
enum AxisStretchMode:
- AXIS_STRETCH_MODE_STRETCH = 0
- AXIS_STRETCH_MODE_TILE = 1
- AXIS_STRETCH_MODE_TILE_FIT = 2
Description¶
Texture Based 3x3 scale style. This stylebox performs a 3x3 scaling of a texture, where only the center cell is fully stretched. This allows for the easy creation of bordered styles.
Property Descriptions¶
- AxisStretchMode axis_stretch_horizontal
| Setter | set_h_axis_stretch_mode(value) |
| Getter | get_h_axis_stretch_mode() |
- AxisStretchMode axis_stretch_vertical
| Setter | set_v_axis_stretch_mode(value) |
| Getter | get_v_axis_stretch_mode() |
- bool draw_center
| Setter | set_draw_center(value) |
| Getter | is_draw_center_enabled() |
- float expand_margin_bottom
| Setter | set_expand_margin_size(value) |
| Getter | get_expand_margin_size() |
Expands the bottom margin of this style box when drawing, causing it be drawn larger than requested.
- float expand_margin_left
| Setter | set_expand_margin_size(value) |
| Getter | get_expand_margin_size() |
Expands the left margin of this style box when drawing, causing it be drawn larger than requested.
- float expand_margin_right
| Setter | set_expand_margin_size(value) |
| Getter | get_expand_margin_size() |
Expands the right margin of this style box when drawing, causing it be drawn larger than requested.
- float expand_margin_top
| Setter | set_expand_margin_size(value) |
| Getter | get_expand_margin_size() |
Expands the top margin of this style box when drawing, causing it be drawn larger than requested.
- float margin_bottom
| Setter | set_margin_size(value) |
| Getter | get_margin_size() |
Increases the bottom margin of the 3x3 texture box.
A higher value means more of the source texture is considered to be part of the bottom border of the 3x3 box.
This is also the value used as fallback for StyleBox.content_margin_bottom if it is negative.
- float margin_left
| Setter | set_margin_size(value) |
| Getter | get_margin_size() |
Increases the left margin of the 3x3 texture box.
A higher value means more of the source texture is considered to be part of the left border of the 3x3 box.
This is also the value used as fallback for StyleBox.content_margin_left if it is negative.
- float margin_right
| Setter | set_margin_size(value) |
| Getter | get_margin_size() |
Increases the right margin of the 3x3 texture box.
A higher value means more of the source texture is considered to be part of the right border of the 3x3 box.
This is also the value used as fallback for StyleBox.content_margin_right if it is negative.
- float margin_top
| Setter | set_margin_size(value) |
| Getter | get_margin_size() |
Increases the top margin of the 3x3 texture box.
A higher value means more of the source texture is considered to be part of the top border of the 3x3 box.
This is also the value used as fallback for StyleBox.content_margin_top if it is negative.
- Color modulate_color
| Setter | set_modulate(value) |
| Getter | get_modulate() |
Modulates the color of the texture when this style box is drawn.
- Texture normal_map
| Setter | set_normal_map(value) |
| Getter | get_normal_map() |
The normal map to use when drawing this style box.
- Rect2 region_rect
| Setter | set_region_rect(value) |
| Getter | get_region_rect() |
Species a sub region of the texture to use.
This is equivalent to first wrapping the texture in an AtlasTexture with the same region.
- Texture texture
| Setter | set_texture(value) |
| Getter | get_texture() |
The texture to use when drawing this style box.