Documentation
¶
Overview ¶
Package TouchScreenButton provides methods for working with TouchScreenButton object instances.
Index ¶
- type Advanced
- type Any
- type Instance
- func (self Instance) Action() string
- func (self Instance) AsCanvasItem() CanvasItem.Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsNode2D() Node2D.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsTouchScreenButton() Instance
- func (self Instance) Bitmask() [1]gdclass.BitMap
- func (self Instance) IsPressed() bool
- func (self Instance) OnPressed(cb func())
- func (self Instance) OnReleased(cb func())
- func (self Instance) PassbyPress() bool
- func (self Instance) SetAction(value string)
- func (self Instance) SetBitmask(value [1]gdclass.BitMap)
- func (self Instance) SetPassbyPress(value bool)
- func (self Instance) SetShape(value [1]gdclass.Shape2D)
- func (self Instance) SetShapeCentered(value bool)
- func (self Instance) SetShapeVisible(value bool)
- func (self Instance) SetTextureNormal(value [1]gdclass.Texture2D)
- func (self Instance) SetTexturePressed(value [1]gdclass.Texture2D)
- func (self Instance) SetVisibilityMode(value gdclass.TouchScreenButtonVisibilityMode)
- func (self Instance) Shape() [1]gdclass.Shape2D
- func (self Instance) ShapeCentered() bool
- func (self Instance) ShapeVisible() bool
- 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
- func (self Instance) VisibilityMode() gdclass.TouchScreenButtonVisibilityMode
- type VisibilityMode
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.TouchScreenButton
TouchScreenButton allows you to create on-screen buttons for touch devices. It's intended for gameplay use, such as a unit you have to touch to move. Unlike [Button], TouchScreenButton supports multitouch out of the box. Several TouchScreenButtons can be pressed at the same time with touch input. This node inherits from [Node2D]. Unlike with [Control] nodes, you cannot set anchors on it. If you want to create menus or user interfaces, you may want to use [Button] nodes instead. To make button nodes react to touch events, you can enable [member ProjectSettings.input_devices/pointing/emulate_mouse_from_touch] in the Project Settings. You can configure TouchScreenButton to be visible only on touch devices, helping you develop your game both for desktop and mobile devices.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsCanvasItem ¶
func (self Instance) AsCanvasItem() CanvasItem.Instance
func (Instance) AsTouchScreenButton ¶
func (Instance) OnReleased ¶
func (self Instance) OnReleased(cb func())
func (Instance) PassbyPress ¶
func (Instance) SetBitmask ¶
func (Instance) SetPassbyPress ¶
func (Instance) SetShapeCentered ¶
func (Instance) SetShapeVisible ¶
func (Instance) SetTextureNormal ¶
func (Instance) SetTexturePressed ¶
func (Instance) SetVisibilityMode ¶
func (self Instance) SetVisibilityMode(value gdclass.TouchScreenButtonVisibilityMode)
func (Instance) ShapeCentered ¶
func (Instance) ShapeVisible ¶
func (Instance) TextureNormal ¶
func (Instance) TexturePressed ¶
func (*Instance) UnsafePointer ¶
func (Instance) VisibilityMode ¶
func (self Instance) VisibilityMode() gdclass.TouchScreenButtonVisibilityMode
type VisibilityMode ¶
type VisibilityMode = gdclass.TouchScreenButtonVisibilityMode //gd:TouchScreenButton.VisibilityMode
const ( /*Always visible.*/ VisibilityAlways VisibilityMode = 0 /*Visible on touch screens only.*/ VisibilityTouchscreenOnly VisibilityMode = 1 )