A basic button for the debugger, extends flash.display.Sprite. Cannot be used in a FlxState.

Constructor

@:value({ ToggleMode : false })new(Icon:BitmapData, ?UpHandler:() ‑> Void, ToggleMode:Bool = false)

Create a new FlxSystemButton

Parameters:

Icon

The icon to use for the button.

UpHandler

The function to be called when the button is pressed.

ToggleMode

Whether this is a toggle button or not.

Variables

@:value(true)enabled:Bool = true

Whether or not the downHandler function will be called when the button is clicked.

@:value(false)toggleMode:Bool = false

Whether this is a toggle button or not. If so, a Boolean representing the current state will be passed to the callback function, and the alpha value will be lowered when toggled.

@:value(false)toggled:Bool = false

Whether the button has been toggled in toggleMode.

upHandler:() ‑> Void

The function to be called when the button is pressed.

Methods

changeIcon(Icon:BitmapData):Void

Change the Icon of the button

Parameters:

Icon

The new icon to use for the button.

Inherited Variables

Inherited Methods

Defined by Sprite

@:value({ bounds : null, lockCenter : false })startDrag(lockCenter:Bool = false, ?bounds:Null<Rectangle>):Void

@:value({ bounds : null, lockCenter : false })startTouchDrag(touchPointID:Int, lockCenter:Bool = false, ?bounds:Null<Rectangle>):Void

stopTouchDrag(touchPointID:Int):Void

Defined by DisplayObjectContainer

Defined by InteractiveObject

@:require(flash11)requestSoftKeyboard():Bool

Defined by DisplayObject

getBounds(targetCoordinateSpace:DisplayObject):Rectangle

getRect(targetCoordinateSpace:DisplayObject):Rectangle

@:require(flash10)globalToLocal3D(point:Point):Vector3D

@:value({ shapeFlag : false })hitTestPoint(x:Float, y:Float, shapeFlag:Bool = false):Bool

@:require(flash10)local3DToGlobal(point3d:Vector3D):Point

Defined by EventDispatcher

@:value({ useWeakReference : false, priority : 0, useCapture : false })addEventListener<T>(type:EventType<T>, listener:T ‑> Void, useCapture:Bool = false, priority:Int = 0, useWeakReference:Bool = false):Void

@:value({ useCapture : false })removeEventListener<T>(type:EventType<T>, listener:T ‑> Void, useCapture:Bool = false):Void