///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Copy constructor /// </summary> /// /// <param name="copy">Instance to copy</param> /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public MenuBar(MenuBar copy) : base(copy) { MenuItemClickedCallback = copy.MenuItemClickedCallback; m_LoadedConfigFile = copy.m_LoadedConfigFile; m_TextFont = copy.m_TextFont; m_Size = copy.m_Size; m_TextSize = copy.m_TextSize; m_DistanceToSide = copy.m_DistanceToSide; m_MinimumMenuWidth = copy.m_MinimumMenuWidth; m_BackgroundColor = copy.m_BackgroundColor; m_TextColor = copy.m_TextColor; m_SelectedBackgroundColor = copy.m_SelectedBackgroundColor; m_SelectedTextColor = copy.m_SelectedTextColor; m_Menus = new List<Menu>(); foreach (Menu menu in copy.m_Menus) { AddMenu(menu.text.DisplayedString); foreach (Text text in menu.menuItems) AddMenuItem(menu.text.DisplayedString, text.DisplayedString); } }
/// <summary> /// Copy constructor /// </summary> /// <param name="copy">Object to copy</param> public MenuBar(MenuBar copy) : base(copy) { }