Documentation
¶
Overview ¶
Package TextureButton provides methods for working with TextureButton object instances.
Index ¶
- type Advanced
- type Any
- type Instance
- func (self Instance) AsBaseButton() BaseButton.Instance
- func (self Instance) AsCanvasItem() CanvasItem.Instance
- func (self Instance) AsControl() Control.Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsTextureButton() Instance
- func (self Instance) FlipH() bool
- func (self Instance) FlipV() bool
- func (self Instance) IgnoreTextureSize() bool
- func (self Instance) SetFlipH(value bool)
- func (self Instance) SetFlipV(value bool)
- func (self Instance) SetIgnoreTextureSize(value bool)
- func (self Instance) SetStretchMode(value gdclass.TextureButtonStretchMode)
- func (self Instance) SetTextureClickMask(value [1]gdclass.BitMap)
- func (self Instance) SetTextureDisabled(value [1]gdclass.Texture2D)
- func (self Instance) SetTextureFocused(value [1]gdclass.Texture2D)
- func (self Instance) SetTextureHover(value [1]gdclass.Texture2D)
- func (self Instance) SetTextureNormal(value [1]gdclass.Texture2D)
- func (self Instance) SetTexturePressed(value [1]gdclass.Texture2D)
- func (self Instance) StretchMode() gdclass.TextureButtonStretchMode
- func (self Instance) TextureClickMask() [1]gdclass.BitMap
- func (self Instance) TextureDisabled() [1]gdclass.Texture2D
- func (self Instance) TextureFocused() [1]gdclass.Texture2D
- func (self Instance) TextureHover() [1]gdclass.Texture2D
- func (self Instance) TextureNormal() [1]gdclass.Texture2D
- func (self Instance) TexturePressed() [1]gdclass.Texture2D
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
- type StretchMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Instance ¶
type Instance [1]gdclass.TextureButton
[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 [Control]s. The "normal" state must contain a texture ([member texture_normal]); other textures are optional. See also [BaseButton] which contains common properties and methods associated with this node.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsBaseButton ¶
func (self Instance) AsBaseButton() BaseButton.Instance
func (Instance) AsCanvasItem ¶
func (self Instance) AsCanvasItem() CanvasItem.Instance
func (Instance) AsTextureButton ¶
func (Instance) IgnoreTextureSize ¶
func (Instance) SetIgnoreTextureSize ¶
func (Instance) SetStretchMode ¶
func (self Instance) SetStretchMode(value gdclass.TextureButtonStretchMode)
func (Instance) SetTextureClickMask ¶
func (Instance) SetTextureDisabled ¶
func (Instance) SetTextureFocused ¶
func (Instance) SetTextureHover ¶
func (Instance) SetTextureNormal ¶
func (Instance) SetTexturePressed ¶
func (Instance) StretchMode ¶
func (self Instance) StretchMode() gdclass.TextureButtonStretchMode
func (Instance) TextureClickMask ¶
func (Instance) TextureDisabled ¶
func (Instance) TextureFocused ¶
func (Instance) TextureHover ¶
func (Instance) TextureNormal ¶
func (Instance) TexturePressed ¶
func (*Instance) UnsafePointer ¶
type StretchMode ¶
type StretchMode = gdclass.TextureButtonStretchMode //gd:TextureButton.StretchMode
const ( /*Scale to fit the node's bounding rectangle.*/ StretchScale StretchMode = 0 /*Tile inside the node's bounding rectangle.*/ StretchTile StretchMode = 1 /*The texture keeps its original size and stays in the bounding rectangle's top-left corner.*/ StretchKeep StretchMode = 2 /*The texture keeps its original size and stays centered in the node's bounding rectangle.*/ StretchKeepCentered StretchMode = 3 /*Scale the texture to fit the node's bounding rectangle, but maintain the texture's aspect ratio.*/ StretchKeepAspect StretchMode = 4 /*Scale the texture to fit the node's bounding rectangle, center it, and maintain its aspect ratio.*/ StretchKeepAspectCentered StretchMode = 5 /*Scale the texture so that the shorter side fits the bounding rectangle. The other side clips to the node's limits.*/ StretchKeepAspectCovered StretchMode = 6 )