internal void OnUnload(object sender, EventArgs eventArgs) { if (AddonButton != null) { if (!IsSubMenu) { MainMenu.AddonButtonContainer.Remove(AddonButton); UsedSubMenuNames.Clear(); SubMenus.Clear(); } // Remove menu from MainMenu instances MainMenu.MenuInstances.Remove(UniqueMenuId); AddonButton = null; } }
public void Clear() { SubMenus.Clear(); }