class flixel.addons.ui.FlxUISpriteButton extends FlxUITypedButton<FlxSprite> implements IFlxUIButton

Available on all platforms

This class extends FlxUISpriteButton and has a Sprite "label" * * 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.

Instance Fields

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

Creates a new FlxUISpriteButton. * *

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 resize(W:Float, H:Float):Void

For IResizable: