Пример #1
0
        /// <summary>
        /// Sets the content.
        /// </summary>
        /// <param name="content">Content.</param>
        public virtual void SetContent(RectTransform content)
        {
            if (content == null)
            {
                return;
            }

            if (DialogInfo != null)
            {
                DialogInfo.SetContent(content);
            }
            else
            {
                if (ContentRoot != null)
                {
                    content.SetParent(ContentRoot, false);
                }
            }
        }
Пример #2
0
 /// <summary>
 /// Sets the info.
 /// </summary>
 /// <param name="title">Title.</param>
 /// <param name="message">Message.</param>
 /// <param name="icon">Icon.</param>
 public virtual void SetInfo(string title = null, string message = null, Sprite icon = null)
 {
     if (DialogInfo != null)
     {
         DialogInfo.SetInfo(title, message, icon);
     }
     else
     {
         if ((title != null) && (TitleText != null))
         {
             TitleText.text = title;
         }
         if ((message != null) && (ContentText != null))
         {
             ContentText.text = message;
         }
         if ((icon != null) && (Icon != null))
         {
             Icon.sprite = icon;
         }
     }
 }