Beispiel #1
0
        /// <summary>
        /// Return this instance to cache.
        /// </summary>
        protected virtual void Return()
        {
            Templates.ToCache(this);

            Buttons.Disable();
            ResetParametres();
        }
Beispiel #2
0
 /// <summary>
 /// Close modal helper with the specified index.
 /// </summary>
 /// <param name="index">Index.</param>
 public static void Close(int index)
 {
     if ((used != null) && (used.ContainsKey(index)))
     {
         used[index].OnClick.RemoveAllListeners();
         Templates.ToCache(used[index]);
         used.Remove(index);
     }
 }
Beispiel #3
0
        /// <summary>
        /// Return this instance to cache.
        /// </summary>
        public void Return()
        {
            Templates.ToCache(this);

            ShowAnimation = oldShowAnimation;
            HideAnimation = oldHideAnimation;

            SetMessage(Templates.Get(TemplateName).text.text);
        }
Beispiel #4
0
        /// <summary>
        /// Return this instance to cache.
        /// </summary>
        public void Return()
        {
            Templates.ToCache(this);

            ShowAnimation = oldShowAnimation;
            HideAnimation = oldHideAnimation;

            if (text != null)
            {
                text.text = Templates.Get(TemplateName).text.text;
            }
        }
Beispiel #5
0
        /// <summary>
        /// Return this instance to cache.
        /// </summary>
        public void Return()
        {
            Templates.ToCache(this);

            ShowAnimation = oldShowAnimation;
            HideAnimation = oldHideAnimation;

            var rt = transform as RectTransform;

            rt.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, oldSize.x);
            rt.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, oldSize.y);
            rt.localRotation = oldRotation;

            var le = GetComponent <LayoutElement>();

            if (le != null)
            {
                le.ignoreLayout = false;
            }

            SetMessage(Templates.Get(TemplateName).text.text);
        }
Beispiel #6
0
 /// <summary>
 /// Close modal helper with the specified index.
 /// </summary>
 /// <param name="index">Index.</param>
 public static void Close(int index)
 {
     Templates.ToCache(used[index]);
     used.Remove(index);
 }