/// <summary>
 /// Sets the lines template.
 /// </summary>
 /// <param name="lines">Lines template.</param>
 public static void SetLines(UITooltipLines lines)
 {
     if (mInstance != null)
     {
         mInstance.Internal_SetLines(lines);
     }
 }
        /// <summary>
        /// Adds spacer line.
        /// </summary>
        protected virtual void Internal_AddSpacer()
        {
            // Make sure we have a template initialized
            if (this.m_LinesTemplate == null)
            {
                this.m_LinesTemplate = new UITooltipLines();
            }

            this.m_LinesTemplate.AddLine("", new RectOffset(0, 0, UITooltipManager.Instance.spacerHeight, 0));
        }
        /// <summary>
        /// Adds title line.
        /// </summary>
        /// <param name="title">Tooltip title.</param>
        protected virtual void Internal_AddTitle(string title)
        {
            // Make sure we have a template initialized
            if (this.m_LinesTemplate == null)
            {
                this.m_LinesTemplate = new UITooltipLines();
            }

            // Add the title line
            this.m_LinesTemplate.AddLine(title, new RectOffset(0, 0, 0, 0), UITooltipLines.LineStyle.Title);
        }
        /// <summary>
        /// Adds description line.
        /// </summary>
        /// <param name="description">Tooltip description.</param>
        protected virtual void Internal_AddDescription(string description)
        {
            // Make sure we have a template initialized
            if (this.m_LinesTemplate == null)
            {
                this.m_LinesTemplate = new UITooltipLines();
            }

            // Add the description line
            this.m_LinesTemplate.AddLine(description, new RectOffset(0, 0, 0, 0), UITooltipLines.LineStyle.Description);
        }
        /// <summary>
        /// Adds a column (Either to the last line if it's not complete or to a new one).
        /// </summary>
        /// <param name="a">Content.</param>
        /// <param name="style">The custom line style name.</param>
        protected void Internal_AddLineColumn(string a, string customStyle)
        {
            // Make sure we have a template initialized
            if (this.m_LinesTemplate == null)
            {
                this.m_LinesTemplate = new UITooltipLines();
            }

            // Add the column
            this.m_LinesTemplate.AddColumn(a, customStyle);
        }
        /// <summary>
        /// Adds a new single column line.
        /// </summary>
        /// <param name="a">Content.</param>
        /// <param name="padding">The line padding.</param>
        /// <param name="customStyle">The custom line style name.</param>
        protected void Internal_AddLine(string a, RectOffset padding, string customStyle)
        {
            // Make sure we have a template initialized
            if (this.m_LinesTemplate == null)
            {
                this.m_LinesTemplate = new UITooltipLines();
            }

            // Add the line
            this.m_LinesTemplate.AddLine(a, padding, customStyle);
        }
        /// <summary>
        /// Adds a new single column line.
        /// </summary>
        /// <param name="a">Content.</param>
        /// <param name="style">The line style.</param>
        protected void Internal_AddLine(string a, UITooltipLines.LineStyle style)
        {
            // Make sure we have a template initialized
            if (this.m_LinesTemplate == null)
            {
                this.m_LinesTemplate = new UITooltipLines();
            }

            // Add the line
            this.m_LinesTemplate.AddLine(a, new RectOffset(), style);
        }
        /// <summary>
        /// Does a line cleanup.
        /// </summary>
        protected virtual void CleanupLines()
        {
            // Clear out the line objects
            foreach (Transform t in this.transform)
            {
                // If the component is not part of the layout dont destroy it
                if (t.gameObject.GetComponent <LayoutElement>() != null)
                {
                    if (t.gameObject.GetComponent <LayoutElement>().ignoreLayout)
                    {
                        continue;
                    }
                }

                Destroy(t.gameObject);
            }

            // Clear out the attributes template
            this.m_LinesTemplate = null;
        }
 /// <summary>
 /// Sets the lines template.
 /// </summary>
 /// <param name="lines">Lines template.</param>
 protected void Internal_SetLines(UITooltipLines lines)
 {
     this.m_LinesTemplate = lines;
 }