View source
class FlxSystemButton
package flixel.system.ui
extends Sprite › DisplayObjectContainer › InteractiveObject › DisplayObject › EventDispatcher
implements IFlxDestroyable
A basic button for the debugger, extends openfl.display.Sprite. Cannot be used in a FlxState.
Constructor
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
enabled:Bool = true
Whether or not the downHandler function will be called when the button is clicked.
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.
Methods
changeIcon(Icon:BitmapData):Void
Change the Icon of the button
Parameters:
Icon | The new icon to use for the button. |
---|