Attention: Here be dragons
This is the
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Texture-based button. Supports Pressed, Hover, Disabled and Focused states.
The "normal" state must contain a texture (texture_normal); other textures are optional.
See also BaseButton which contains common properties and methods associated with this node.
StretchMode STRETCH_SCALE =
Scale to fit the node's bounding rectangle.
StretchMode STRETCH_TILE =
Tile inside the node's bounding rectangle.
StretchMode STRETCH_KEEP =
The texture keeps its original size and stays in the bounding rectangle's top-left corner.
StretchMode STRETCH_KEEP_CENTERED =
The texture keeps its original size and stays centered in the node's bounding rectangle.
StretchMode STRETCH_KEEP_ASPECT =
Scale the texture to fit the node's bounding rectangle, but maintain the texture's aspect ratio.
StretchMode STRETCH_KEEP_ASPECT_CENTERED =
Scale the texture to fit the node's bounding rectangle, center it, and maintain its aspect ratio.
StretchMode STRETCH_KEEP_ASPECT_COVERED =
Scale the texture so that the shorter side fits the bounding rectangle. The other side clips to the node's limits.
bool flip_h =
true, texture is flipped horizontally.
bool flip_v =
true, texture is flipped vertically.
bool ignore_texture_size =
true, the size of the texture won't be considered for minimum size calculation, so the TextureButton can be shrunk down past the texture size.
StretchMode stretch_mode =
Controls the texture's behavior when you resize the node's bounding rectangle. See the StretchMode constants for available options.