Button for touch screen devices.
    public class TouchScreenButton : Node2D

Button for touch screen devices. You can set it to be visible on all screens, or only on touch devices.

Inheritance Chain

Constructors

    public TouchScreenButton()

Signals

    "pressed" ()

Emitted when the button is pressed (down).

    "released" ()

Emitted when the button is released (up).

Properties

    public string Action { get; set; }

The button’s action. Actions can be handled with InputEventAction.

    public BitMap Bitmask { get; set; }

The button’s bitmask.

    public Texture Normal { get; set; }

The button’s texture for the normal state.

    public bool PassbyPress { get; set; }

If true, pass-by presses are enabled.

    public Texture Pressed { get; set; }

The button’s texture for the pressed state.

    public Shape2D Shape { get; set; }

The button’s shape.

    public bool ShapeCentered { get; set; }

If true, the button’s shape is centered.

    public bool ShapeVisible { get; set; }

If true, the button’s shape is visible.

    public VisibilityModeEnum VisibilityMode { get; set; }

The button’s visibility mode. See VisibilityMode for possible values.

Methods

    [Obsolete("GetAction is deprecated. Use the Action property instead.")]
    public string GetAction()

Getter for Action

    [Obsolete("GetBitmask is deprecated. Use the Bitmask property instead.")]
    public BitMap GetBitmask()

Getter for Bitmask

    [Obsolete("GetShape is deprecated. Use the Shape property instead.")]
    public Shape2D GetShape()

Getter for Shape

    [Obsolete("GetTexture is deprecated. Use the Normal property instead.")]
    public Texture GetTexture()

Getter for Normal

    [Obsolete("GetTexturePressed is deprecated. Use the Pressed property instead.")]
    public Texture GetTexturePressed()

Getter for Pressed

    [Obsolete("GetVisibilityMode is deprecated. Use the VisibilityMode property instead.")]
    public VisibilityModeEnum GetVisibilityMode()

Getter for VisibilityMode

    [Obsolete("IsPassbyPressEnabled is deprecated. Use the PassbyPress property instead.")]
    public bool IsPassbyPressEnabled()

Getter for PassbyPress

    public bool IsPressed()

Returns true if this button is currently pressed.

    [Obsolete("IsShapeCentered is deprecated. Use the ShapeCentered property instead.")]
    public bool IsShapeCentered()

Getter for ShapeCentered

    [Obsolete("IsShapeVisible is deprecated. Use the ShapeVisible property instead.")]
    public bool IsShapeVisible()

Getter for ShapeVisible

    [Obsolete("SetAction is deprecated. Use the Action property instead.")]
    public void SetAction(string action)

Setter for Action

    [Obsolete("SetBitmask is deprecated. Use the Bitmask property instead.")]
    public void SetBitmask(BitMap bitmask)

Setter for Bitmask

    [Obsolete("SetPassbyPress is deprecated. Use the PassbyPress property instead.")]
    public void SetPassbyPress(bool enabled)

Setter for PassbyPress

    [Obsolete("SetShape is deprecated. Use the Shape property instead.")]
    public void SetShape(Shape2D shape)

Setter for Shape

    [Obsolete("SetShapeCentered is deprecated. Use the ShapeCentered property instead.")]
    public void SetShapeCentered(bool @bool)

Setter for ShapeCentered

    [Obsolete("SetShapeVisible is deprecated. Use the ShapeVisible property instead.")]
    public void SetShapeVisible(bool @bool)

Setter for ShapeVisible

    [Obsolete("SetTexture is deprecated. Use the Normal property instead.")]
    public void SetTexture(Texture texture)

Setter for Normal

    [Obsolete("SetTexturePressed is deprecated. Use the Pressed property instead.")]
    public void SetTexturePressed(Texture texturePressed)

Setter for Pressed

    [Obsolete("SetVisibilityMode is deprecated. Use the VisibilityMode property instead.")]
    public void SetVisibilityMode(VisibilityModeEnum mode)

Setter for VisibilityMode

Inner Types

VisibilityModeEnum

Name Value Description
Always 0 Always visible.
TouchscreenOnly 1 Visible on touch screens only.
Tags: