Skip to content
ClassInput & Controls@public

FlxVirtualButton

Deterministic touch/pointer button that can be bound through link.

ts
export declare class FlxVirtualButton extends FlxButton implements FlxVirtualButtonState

Constructors

ts
constructor(id: string, x: number, y: number, label: string, options?: FlxVirtualButtonOptions)

Constructs a new instance of the FlxVirtualButton class

ParameterTypeDescription
idstring-
xnumber-
ynumber-
labelstring-
optionsFlxVirtualButtonOptions-

Properties

PropertyModifiersTypeDescription
disabledColor-number-
highlightColor-number-
justPressedreadonlyboolean-
justReleasedreadonlyboolean-
normalColor-number-
pressedreadonlyboolean-
pressedColor-number-
sourcereadonlyFlxActionVirtualButtonSourceSerializable action source for this control.
virtualInputIdreadonlystring-

Methods

createRenderHandle()

ts
createRenderHandle(): FlxVirtualButtonRenderHandle

Returns: FlxVirtualButtonRenderHandle

destroy()

ts
destroy(): void

Returns: void

update()

ts
update(): void

Returns: void

Released under the MIT License.