TextureButton

package
v0.0.0-...-d9f4d4e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package TextureButton provides methods for working with TextureButton object instances.

Index

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 Any

type Any interface {
	gd.IsClass
	AsTextureButton() Instance
}

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 New

func New() Instance

func (Instance) AsBaseButton

func (self Instance) AsBaseButton() BaseButton.Instance

func (Instance) AsCanvasItem

func (self Instance) AsCanvasItem() CanvasItem.Instance

func (Instance) AsControl

func (self Instance) AsControl() Control.Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsTextureButton

func (self Instance) AsTextureButton() Instance

func (Instance) FlipH

func (self Instance) FlipH() bool

func (Instance) FlipV

func (self Instance) FlipV() bool

func (Instance) IgnoreTextureSize

func (self Instance) IgnoreTextureSize() bool

func (Instance) SetFlipH

func (self Instance) SetFlipH(value bool)

func (Instance) SetFlipV

func (self Instance) SetFlipV(value bool)

func (Instance) SetIgnoreTextureSize

func (self Instance) SetIgnoreTextureSize(value bool)

func (Instance) SetStretchMode

func (self Instance) SetStretchMode(value gdclass.TextureButtonStretchMode)

func (Instance) SetTextureClickMask

func (self Instance) SetTextureClickMask(value [1]gdclass.BitMap)

func (Instance) SetTextureDisabled

func (self Instance) SetTextureDisabled(value [1]gdclass.Texture2D)

func (Instance) SetTextureFocused

func (self Instance) SetTextureFocused(value [1]gdclass.Texture2D)

func (Instance) SetTextureHover

func (self Instance) SetTextureHover(value [1]gdclass.Texture2D)

func (Instance) SetTextureNormal

func (self Instance) SetTextureNormal(value [1]gdclass.Texture2D)

func (Instance) SetTexturePressed

func (self Instance) SetTexturePressed(value [1]gdclass.Texture2D)

func (Instance) StretchMode

func (self Instance) StretchMode() gdclass.TextureButtonStretchMode

func (Instance) TextureClickMask

func (self Instance) TextureClickMask() [1]gdclass.BitMap

func (Instance) TextureDisabled

func (self Instance) TextureDisabled() [1]gdclass.Texture2D

func (Instance) TextureFocused

func (self Instance) TextureFocused() [1]gdclass.Texture2D

func (Instance) TextureHover

func (self Instance) TextureHover() [1]gdclass.Texture2D

func (Instance) TextureNormal

func (self Instance) TextureNormal() [1]gdclass.Texture2D

func (Instance) TexturePressed

func (self Instance) TexturePressed() [1]gdclass.Texture2D

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

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
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL