Click or drag to resize

StyleBoxTexture Properties

The StyleBoxTexture type exposes the following members.

Properties
  NameDescription
Public propertyAxisStretchHorizontal

Controls how the stylebox's texture will be stretched or tiled horizontally. See StyleBoxTextureAxisStretchMode for possible values.

Public propertyAxisStretchVertical

Controls how the stylebox's texture will be stretched or tiled vertically. See StyleBoxTextureAxisStretchMode for possible values.

Public propertyContentMarginBottom

The bottom margin for the contents of this style box. Increasing this value reduces the space available to the contents from the bottom.

If this value is negative, it is ignored and a child-specific margin is used instead. For example for StyleBoxFlat the border thickness (if any) is used instead.

It is up to the code using this style box to decide what these contents are: for example, a Button respects this content margin for the textual contents of the button.

GetMargin(Margin) should be used to fetch this value as consumer instead of reading these properties directly. This is because it correctly respects negative values and the fallback mentioned above.

(Inherited from StyleBox.)
Public propertyContentMarginLeft

The left margin for the contents of this style box.Increasing this value reduces the space available to the contents from the left.

Refer to ContentMarginBottom for extra considerations.

(Inherited from StyleBox.)
Public propertyContentMarginRight

The right margin for the contents of this style box. Increasing this value reduces the space available to the contents from the right.

Refer to ContentMarginBottom for extra considerations.

(Inherited from StyleBox.)
Public propertyContentMarginTop

The top margin for the contents of this style box. Increasing this value reduces the space available to the contents from the top.

Refer to ContentMarginBottom for extra considerations.

(Inherited from StyleBox.)
Public propertyDrawCenter

If true, the nine-patch texture's center tile will be drawn.

Public propertyDynamicObject
Gets a new DynamicGodotObject associated with this instance.
(Inherited from Object.)
Public propertyExpandMarginBottom

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

Public propertyExpandMarginLeft

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

Public propertyExpandMarginRight

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

Public propertyExpandMarginTop

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

Public propertyMarginBottom

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

Public propertyMarginLeft

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

Public propertyMarginRight

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

Public propertyMarginTop

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

Public propertyModulateColor

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

Public propertyNativeInstance (Inherited from Object.)
Public propertyNormalMap

The normal map to use when drawing this style box.

Note: Godot expects the normal map to use X+, Y-, and Z+ coordinates. See this page for a comparison of normal map coordinates expected by popular engines.

Public propertyRegionRect

Species a sub-region of the texture to use.

This is equivalent to first wrapping the texture in an AtlasTexture with the same region.

Public propertyResourceLocalToScene

If true, the resource will be made unique in each instance of its local scene. It can thus be modified in a scene instance without impacting other instances of that same scene.

(Inherited from Resource.)
Public propertyResourceName

The name of the resource. This is an optional identifier. If ResourceName is not empty, its value will be displayed to represent the current resource in the editor inspector. For built-in scripts, the ResourceName will be displayed as the tab name in the script editor.

(Inherited from Resource.)
Public propertyResourcePath

The path to the resource. In case it has its own file, it will return its filepath. If it's tied to the scene, it will return the scene's path, followed by the resource's index.

(Inherited from Resource.)
Public propertyTexture

The texture to use when drawing this style box.

Top
See Also