Inherits: Node2D < CanvasItem < Node < Object
Button for touch screen devices.
pressed ( )
Emitted when the button is pressed (down).
released ( )
Emitted when the button is released (up).
String action - The button’s action. Actions can be handled with InputEventAction.
BitMap bitmask - The button’s bitmask.
Texture normal - The button’s texture for the normal state.
bool passby_press - If
true passby presses are enabled.
Texture pressed - The button’s texture for the pressed state.
Shape2D shape - The button’s shape.
bool shape_centered - If
true the button’s shape is centered.
bool shape_visible - If
true the button’s shape is visible.
VisibilityMode visibility_mode - The button’s visibility mode. See
VISIBILITY_ALWAYS = 0 — Always visible.
VISIBILITY_TOUCHSCREEN_ONLY = 1 — Visible on touch screens only.
Button for touch screen devices. You can set it to be visible on all screens, or only on touch devices.
Member Function Description
bool is_pressed ( ) const
true if this button is currently pressed.