Class ItemsListContextMenu
The custom context menu that shows a list of items and supports searching by name and query results highlighting.
Inheritance
Implements
Namespace: FlaxEditor.GUI
Assembly: FlaxEngine.CSharp.dll
Syntax
public class ItemsListContextMenu : ContextMenuBase, IComparable, IDrawableConstructors
ItemsListContextMenu(Single, Single, Boolean)
Initializes a new instance of the ItemsListContextMenu class.
Declaration
public ItemsListContextMenu(float width = 320F, float height = 220F, bool withSearch = true)Parameters
| System.Single
        width The control width. | 
| System.Single
        height The control height. | 
| System.Boolean
        withSearch Enables search field. | 
Fields
ItemsPanel
The panel control where you should add your items.
Declaration
public readonly VerticalPanel ItemsPanelField Value
| VerticalPanel 
 | 
Methods
AddItem(ItemsListContextMenu.Item)
Adds the item to the view and registers for the click event.
Declaration
public void AddItem(ItemsListContextMenu.Item item)Parameters
| FlaxEditor.GUI.ItemsListContextMenu.Item
        item The item. | 
ClearItems()
Removes all added items.
Declaration
public void ClearItems()Hide()
Declaration
public override void Hide()Overrides
OnClickItem(ItemsListContextMenu.Item)
Called when user clicks on an item.
Declaration
public void OnClickItem(ItemsListContextMenu.Item item)Parameters
| FlaxEditor.GUI.ItemsListContextMenu.Item
        item The item. | 
OnKeyDown(KeyboardKeys)
Declaration
public override bool OnKeyDown(KeyboardKeys key)Parameters
| KeyboardKeys
        key 
 | 
Returns
| System.Boolean 
 | 
Overrides
OnShow()
Declaration
protected override void OnShow()Overrides
ResetView()
Resets the view.
Declaration
public void ResetView()ScrollToAndHighlightItemByName(String)
Scrolls to the item and focuses it by name.
Declaration
public void ScrollToAndHighlightItemByName(string itemName)Parameters
| System.String
        itemName The item name. | 
ScrollViewTo(ItemsListContextMenu.Item)
Scrolls the scroll panel to a specific Item
Declaration
public void ScrollViewTo(ItemsListContextMenu.Item item)Parameters
| FlaxEditor.GUI.ItemsListContextMenu.Item
        item The item to scroll to. | 
Search(String)
Applies custom search text query on the items list. Works even if search field is disabled
Declaration
public void Search(string text)Parameters
| System.String
        text The custom search text. Null to clear search. | 
SelectItem(ItemsListContextMenu.Item)
Focuses and scroll to the given item to be selected.
Declaration
public void SelectItem(ItemsListContextMenu.Item item)Parameters
| FlaxEditor.GUI.ItemsListContextMenu.Item
        item The item to select. | 
SortItems()
Sorts the items list (by item name by default).
Declaration
public void SortItems()Events
ItemClicked
Event fired when any item in this popup menu gets clicked.
Declaration
public event Action<ItemsListContextMenu.Item> ItemClickedEvent Type
| System.Action<FlaxEditor.GUI.ItemsListContextMenu.Item> 
 | 
TextChanged
Event fired when search text in this popup menu gets changed.
Declaration
public event Action<string> TextChangedEvent Type
| System.Action<System.String> 
 |