UIMenuListItem

This item requires a list of values to be given, the menu will then scroll the items left/right. This item has 2 events, OnListChange called everytime the user goes left/right and OnListSelect called when the user selects the item after highlighting it. The item inherits all the UIMenuItem functions and adds some of his.
This item is sheduled to become obsolete and legacy in future updates of the library. It will be replaced by the more runtime friendly UIMenuDynamicListItem.
Constructor
UIMenuListItem(string text, List<dynamic> items, int index)
UIMenuListItem(string text, List<dynamic> items, int index, string description)
UIMenuListItem(string text, List<dynamic> items, int index, string description, HudColor mainColor, HudColor higlightColor)
UIMenuListItem.New(Text, Items, Index, Description, mainColor, highlightColor, textColor, highlightedTextColor)
Parameters
Items
The values given in constructor are saved in the Items list.
List<object> Items { get; }
var values = listItem.Items;
local values = listitem.Items
Index
Gets or Sets the current item index to show the corresponding value in the given Items list
int Index { get; set; }
item:Index(index)
Functions
ChangeList
This functions updates the current list of values with a new one. A new starting index can be optionally specified.
public void ChangeList(List<dynamic> list, int index)
listitem::ChangeList(list)
Events
OnListChange
Triggered everytime the player goes left or right
public event ListChangedEvent OnListChange;
OnListChange = function(menu, item, newindex)
end
OnListSelect
Triggered everytime the player selects the item after highlighting it.
public event ListSelectedEvent OnListSelect;
OnListSelect = function(menu, item, newindex)
end