class flixel.addons.ui.FlxUIColorSwatch extends FlxUIButton

Available on all platforms

... * @author

Class Fields

static var CLICK_EVENT:String

Instance Fields

function new(X:Float, Y:Float, ?Color:Int = 16777215, ?Colors:SwatchData = null, ?Asset:Dynamic = null, ?Callback:Void ->Void = null, ?Width:Int = -1, ?Height:Int = -1):Void

Creates a new color swatch that can store and display a color value *

X*
Y*
?Color

Single color for the swatch *

?Colors

Multiple colors for the swatch *

?Asset

An asset for the swatch graphic (optional) *

?Callback

Function to call when clicked

function callback():Void

function colorKey():String

function destroy():Void

function equalsSwatch(swatch:SwatchData):Bool

function refreshColor():Void

function setColorAtIndex(Color:Int, index:Int):Void

Set a color at a specific index in the swatch *

Color*
index