StyleBoxTexture

Inherits: StyleBox < Resource < Reference < Object

Category: Core

Brief Description

Texture-based nine-patch StyleBox.

Methods

float get_expand_margin_size ( Margin margin ) const
float get_margin_size ( Margin margin ) const
void set_expand_margin_all ( float size )
void set_expand_margin_individual ( float size_left, float size_top, float size_right, float size_bottom )
void set_expand_margin_size ( Margin margin, float size )
void set_margin_size ( Margin margin, float size )

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 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.

Property Descriptions

Default 0
Setter set_h_axis_stretch_mode(value)
Getter get_h_axis_stretch_mode()

Default 0
Setter set_v_axis_stretch_mode(value)
Getter get_v_axis_stretch_mode()

Default true
Setter set_draw_center(value)
Getter is_draw_center_enabled()

  • float expand_margin_bottom
Default 0.0
Setter set_expand_margin_size(value)
Getter get_expand_margin_size()

Expands the bottom margin of this style box when drawing, causing it to be drawn larger than requested.


  • float expand_margin_left
Default 0.0
Setter set_expand_margin_size(value)
Getter get_expand_margin_size()

Expands the left margin of this style box when drawing, causing it to be drawn larger than requested.


  • float expand_margin_right
Default 0.0
Setter set_expand_margin_size(value)
Getter get_expand_margin_size()

Expands the right margin of this style box when drawing, causing it to be drawn larger than requested.


  • float expand_margin_top
Default 0.0
Setter set_expand_margin_size(value)
Getter get_expand_margin_size()

Expands the top margin of this style box when drawing, causing it to be drawn larger than requested.


Default 0.0
Setter set_margin_size(value)
Getter get_margin_size()

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 StyleBox.content_margin_bottom if it is negative.


Default 0.0
Setter set_margin_size(value)
Getter get_margin_size()

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 StyleBox.content_margin_left if it is negative.


Default 0.0
Setter set_margin_size(value)
Getter get_margin_size()

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 StyleBox.content_margin_right if it is negative.


Default 0.0
Setter set_margin_size(value)
Getter get_margin_size()

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 StyleBox.content_margin_top if it is negative.


Default Color( 1, 1, 1, 1 )
Setter set_modulate(value)
Getter get_modulate()

Modulates the color of the texture when this style box is drawn.


Setter set_normal_map(value)
Getter get_normal_map()

The normal map to use when drawing this style box.


Default Rect2( 0, 0, 0, 0 )
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.


Setter set_texture(value)
Getter get_texture()

The texture to use when drawing this style box.

Method Descriptions



  • void set_expand_margin_all ( float size )

  • void set_expand_margin_individual ( float size_left, float size_top, float size_right, float size_bottom )

  • void set_expand_margin_size ( Margin margin, float size )