class flixel.system.ui.FlxSystemButton extends Sprite implements IFlxDestroyable

Available on all platforms

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

Instance Fields

var enabled:Bool

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

var toggleMode:Bool

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.

var toggled:Bool

Whether the button has been toggled in toggleMode.

function new(Icon:BitmapData, ?UpHandler:Void ->Void = null, ?ToggleMode:Bool = false):Void

Create a new FlxSystemButton * *

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.

function changeIcon(Icon:BitmapData):Void

Change the Icon of the button * *

Icon

The new icon to use for the button.

function destroy():Void

function upHandler():Void

The function to be called when the button is pressed.