Struct TouchScreenButton

Button for touch screen devices.

struct TouchScreenButton ;

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

Properties

NameTypeDescription
action[get, set] StringThe button's action. Actions can be handled with InputEventAction.
bitmask[get, set] BitMapThe button's bitmask.
normal[get, set] TextureThe button's texture for the normal state.
passbyPress[get, set] boolIf true, pass-by presses are enabled.
pressed[get, set] TextureThe button's texture for the pressed state.
shape[get, set] Shape2DThe button's shape.
shapeCentered[get, set] boolIf true, the button's shape is centered in the provided texture. If no texture is used, this property has no effect.
shapeVisible[get, set] boolIf true, the button's shape is visible.
visibilityMode[get, set] TouchScreenButton.VisibilityModeThe button's visibility mode. See visibilitymode for possible values.

Methods

NameDescription
_input
getAction
getBitmask
getShape
getTexture
getTexturePressed
getVisibilityMode
isPassbyPressEnabled
isPressed Returns true if this button is currently pressed.
isShapeCentered
isShapeVisible
setAction
setBitmask
setPassbyPress
setShape
setShapeCentered
setShapeVisible
setTexture
setTexturePressed
setVisibilityMode

Enums

NameDescription
Constants
VisibilityMode