Texture-based button. Supports Pressed, Hover, Disabled and Focused states.
Description
TextureButton has the same functionality as Button, except it uses sprites instead of Godot's Theme resource. It is faster to create, but it doesn't support localization like more complex Controls.
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.
Enumerations
enum StretchMode:
StretchMode STRETCH_SCALE = 0
Scale to fit the node's bounding rectangle.
StretchMode STRETCH_TILE = 1
Tile inside the node's bounding rectangle.
StretchMode STRETCH_KEEP = 2
The texture keeps its original size and stays in the bounding rectangle's top-left corner.
StretchMode STRETCH_KEEP_CENTERED = 3
The texture keeps its original size and stays centered in the node's bounding rectangle.
StretchMode STRETCH_KEEP_ASPECT = 4
Scale the texture