class flixel.addons.ui.FlxUIButton extends FlxUITypedButton<FlxUIText> implements IFlxUIButton implements ILabeled

Available on all platforms

This class extends FlxUITypedButton and has a Text label, and is thus * most analagous to the regular FlxButton * * Like all FlxUITypedButton's, it can work as a toggle button, and load * 9-slice sprites for its button images, and be dynamically resized * accordingly. * * Furthermore, you have the ability to set the text's coloring for each * state just by adjusting a few public variables

Instance Fields

function new(?X:Float = 0, ?Y:Float = 0, ?Label:String = null, ?OnClick:Void ->Void = null):Void

Creates a new FlxUIButton. * *

X

The X position of the button. *

Y

The Y position of the button. *

Label

The text that you want to appear on the button. *

OnClick

The function to call whenever the button is clicked.

function addIcon(icon:FlxSprite, ?X:Int = 0, ?Y:Int = 0, ?center:Bool = true):Void

function changeIcon(newIcon:FlxSprite):Void

function destroy():Void

function getLabel():FlxUIText

function removeIcon():Void

function resize(W:Float, H:Float):Void

For IResizable:

function setLabel(t:FlxUIText):FlxUIText

For ILabeled: