///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Copy constructor /// </summary> /// /// <param name="copy">Instance to copy</param> /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public ChatBox(ChatBox copy) : base(copy) { m_LoadedConfigFile = copy.m_LoadedConfigFile; m_LineSpacing = copy.m_LineSpacing; m_TextSize = copy.m_TextSize; m_TextColor = copy.m_TextColor; m_BorderColor = copy.m_BorderColor; m_Borders = copy.m_Borders; m_MaxLines = copy.m_MaxLines; m_FullTextHeight = copy.m_FullTextHeight; m_Panel = new Panel(copy.m_Panel); // If there is a scrollbar then copy it if (copy.m_Scroll != null) m_Scroll = new Scrollbar(copy.m_Scroll); }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Copy constructor /// </summary> /// /// <param name="copy">Instance to copy</param> /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public Panel(Panel copy) : base(copy) { LeftMousePressedCallback = copy.LeftMousePressedCallback; LeftMouseReleasedCallback = copy.LeftMouseReleasedCallback; LeftMouseClickedCallback = copy.LeftMouseClickedCallback; m_Size = copy.m_Size; m_BackgroundColor = copy.m_BackgroundColor; m_Texture = copy.m_Texture; if (m_Texture != null) { m_Sprite.Texture = m_Texture; m_Sprite.Scale = new Vector2f(m_Size.X / m_Texture.Size.X, m_Size.Y / m_Texture.Size.Y); m_Sprite.Color = new Color (255, 255, 255, m_Opacity); } }