Skip to content

YaUIList

YaUIList controls lists in the UI.

Properties

string DefaultItem

CLIENT ONLY 
Sets the resource URL to render default items on the list.

number NumItems

CLIENT ONLY 
Sets the number of items on the list.

ScrollPane ScrollPane

CLIENT ONLY 
Gets the properties of the current list's scrollPane.

boolean TouchEffect

CLIENT ONLY 
Determines whether the list can be scrolled. If true, the list can be scrolled. If false, the list can not be scrolled.

EventListener OnClickItem

CLIENT ONLY 
Click the left mouse button urgently list item event

EventListener OnRightClickItem

CLIENT ONLY 
Click the right mouse button urgently list item event

Functions

YaUIObject AddChildAt(YaUIObject child, number index)

CLIENT ONLY 
Adds an item to a specific index on the list.

YaUIObject RemoveChildAt(number index, boolean dispose)

CLIENT ONLY 
Removes the item at a specific index from the list.

boolean IsChildInView(YaUIObject yaUIObject)

CLIENT ONLY 
Verifies whether the item is visible in the current list view.

number ItemIndexToChildIndex(number index)

CLIENT ONLY 
Converts item index to display object index.

number ChildIndexToItemIndex(number index)

CLIENT ONLY 
Converts display object index to item index.

YaUIObject GetChild(string name)

CLIENT ONLY 
Gets an item by name from the list.

YaUIObject GetChildAt(number index)

CLIENT ONLY 
Gets an item by index from the list.

void SetVirtual()

CLIENT ONLY 
Sets the current list to be a virtual list (with unspecified length).

void SetVirtualAndLoop()

CLIENT ONLY 
Sets the list to be a virtual list, and has loop behavior.

void RefreshVirtualList(number num)

CLIENT ONLY 
Refreshes the virtual list.

void DoDispose()

CLIENT ONLY 
Disposes of the list.

Events

ItemRenderer<number, YaUIObject>

CLIENT ONLY 
Sets the callback function for rendering items on the list.

ItemProvider<void>

CLIENT ONLY 
Sets how to render items on the list based on the resource addresses of different items.