/// <summary> /// Clears the data associated with the current context menu /// </summary> public void ClearContextMenu() { if (activeContextMenu != null) { activeContextMenu.Hide(); } activeContextMenu = null; contextMenuOwner = null; }
/// <summary> /// Helper for updating the active menu cached in this class /// and in the Node Editor /// </summary> /// <param name="menu">The menu to be set</param> /// <param name="menuOwner">The owner of the menu</param> protected void UpdateActiveMenu(GUIGenericMenu menu, System.Object menuOwner) { if (activeMenu != null) { activeMenu.OnHide -= ActiveMenu_OnHide; activeMenu.Hide(); } activeMenu = menu; if (activeMenu != null) { activeMenu.OnHide += ActiveMenu_OnHide; NodeEditor.ChangeActiveContextMenu(menu, menuOwner); } }