class flixel.addons.ui.FlxUIDropDownMenu extends FlxUIGroup implements IHasParams implements IFlxUIClickable implements IFlxUIWidget

Available on all platforms

larsiusprime * @author

Class Fields

static var CLICK_EVENT:String

static function makeStrIdLabelArray(StringArray:Array<String>, ?UseIndexID:Bool = false):Array<StrIdLabel>

Helper function to easily create a data list for a dropdown menu from an array of strings. * *

StringArray

The strings to use as data - used for both label and string ID. *

UseIndexID

Whether to use the integer index of the current string as ID. *

returns

The StrIDLabel array ready to be used in FlxUIDropDownMenu's constructor

Instance Fields

var dropPanel:FlxUI9SliceSprite

The background for the list.

var header:FlxUIDropDownHeader

The header of this dropdown menu.

var list:Array<FlxUIButton>

The list of items that is shown when the toggle button is clicked.

function new(?X:Float = 0, ?Y:Float = 0, DataList:Array<StrIdLabel>, ?Callback:String ->Void = null, ?Header:FlxUIDropDownHeader = null, ?DropPanel:FlxUI9SliceSprite = null, ?ButtonList:Array<FlxUIButton> = null, ?UIControlCallback:Bool ->FlxUIDropDownMenu ->Void = null):Void

This creates a new dropdown menu. * *

X

x position of the dropdown menu *

Y

y position of the dropdown menu *

DataList

The data to be displayed *

Callback

Optional Callback *

Header

The header of this dropdown menu *

DropPanel

Optional 9-slice-background for actual drop down menu *

ButtonList

Optional list of buttons to be used for the corresponding entry in DataList *

UIControlCallback

Used internally by FlxUI

function callback(:String):Void

function changeLabelById(id:String, NewLabel:String):Void

function changeLabelByIndex(i:Int, NewLabel:String):Void

function destroy():Void

function setData(DataList:Array<StrIdLabel>):Void

Change the contents with a new data list * Replaces the old content with the new content *

DataList

function update():Void