class flixel.addons.ui.FlxUIDropDownMenu extends FlxUIGroup implements IHasParams implements IFlxUIClickable implements IFlxUIWidget
Available on all platforms
larsiusprime * @author
Class Fields
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
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 setData(DataList:Array<StrIdLabel>):Void
Change the contents with a new data list * Replaces the old content with the new content *
DataList |