Class ItemsListContextMenu
The custom context menu that shows a list of items and supports searching by name and query results highlighting.
Inheritance
System.Object
FlaxEditor.GUI.ContextMenu.ContextMenuBase
ItemsListContextMenu
Implements
System.IComparable
Namespace: FlaxEditor.GUI
Assembly: FlaxEngine.CSharp.dll
Syntax
public class ItemsListContextMenu : ContextMenuBase, IComparable, IDrawable
Constructors
ItemsListContextMenu(Single, Single)
Initializes a new instance of the ItemsListContextMenu class.
Declaration
public ItemsListContextMenu(float width = 320F, float height = 220F)
Parameters
System.Single
width
The control width. |
System.Single
height
The control height. |
Fields
ItemsPanel
The panel control where you should add your items.
Declaration
public readonly VerticalPanel ItemsPanel
Field 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. |
Hide()
Declaration
public override void Hide()
Overrides
FlaxEditor.GUI.ContextMenu.ContextMenuBase.Hide()
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
FlaxEditor.GUI.ContextMenu.ContextMenuBase.OnKeyDown(FlaxEngine.KeyboardKeys)
OnShow()
Declaration
protected override void OnShow()
Overrides
FlaxEditor.GUI.ContextMenu.ContextMenuBase.OnShow()
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. |
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> ItemClicked
Event Type
System.Action<FlaxEditor.GUI.ItemsListContextMenu.Item>
|
TextChanged
Event fired when search text in this popup menu gets changed.
Declaration
public event Action<string> TextChanged
Event Type
System.Action<System.String>
|
Extension Methods
See Also
FlaxEditor.GUI.ContextMenu.ContextMenuBase