Class: UIList

PhaserComps.UIComponents. UIList

List component. Item clip instances are supposed to exist as it's children, with keys item_0, item_1 and so on.

When data array applied, every array item is applied to its' view instance

Useful for short lists, and for lists with custom items layout.


new UIList( [parent] [, key], rendererClass)

Parameters:
Name Type Argument Description
parent PhaserComps.UIComponents.UIComponentPrototype <optional>

UIComponentPrototype instance to find clip inside

key String <optional>

key to find clip inside parent

rendererClass Class

class for items, best if extending UIListBaseItem

Properties:
Name Type Description
data Array.<*>

any data array to apply to list items

Fires:

Methods


clean()

Destroy all items renderer instances


<protected> destroy()


getStateId()

Returns:
Type
String

Events


EVENT_ITEM_CHANGE

Emitted when any item emits such even.

Parameters:
Name Type Description
item PhaserComps.UIComponents.UIListBaseItem

item instance, that emitted change event