public override void StartTransition(UIPanelManager.SHOW_MODE mode)
 {
     if (mode == UIPanelManager.SHOW_MODE.BringInBack || mode == UIPanelManager.SHOW_MODE.BringInForward)
     {
         this.SetPanelState(UIBistateInteractivePanel.STATE.SHOWING);
     }
     else
     {
         this.SetPanelState(UIBistateInteractivePanel.STATE.HIDDEN);
     }
 }
 // A pass-through for starting our transition so
 // that we capture our state:
 public override void StartTransition(UIPanelManager.SHOW_MODE mode)
 {
     if (mode == UIPanelManager.SHOW_MODE.BringInBack ||
         mode == UIPanelManager.SHOW_MODE.BringInForward)
     {
         SetPanelState(STATE.SHOWING);
     }
     else
     {
         SetPanelState(STATE.HIDDEN);
     }
 }
예제 #3
0
    /// <summary>
    /// Starts one of the panel's "bring in" or "dismiss" transitions.
    /// </summary>
    /// <param name="mode">The mode corresponding to the transition that should be played.</param>
    public virtual void StartTransition(UIPanelManager.SHOW_MODE mode)
    {
        if (!m_started)
        {
            Start();
        }

        // Finish any pending transition:
        if (prevTransition != null)
        {
            prevTransition.StopSafe();
        }

        prevTransIndex = (int)mode;

        if (blockInput[prevTransIndex])
        {
            UIManager.instance.LockInput();
        }

        prevTransition = Transitions.list[prevTransIndex];

        // Activate all children, if we were set to deactivate
        // them on dismissal:
        if (deactivateAllOnDismiss)
        {
            if (mode == UIPanelManager.SHOW_MODE.BringInBack ||
                mode == UIPanelManager.SHOW_MODE.BringInForward)
            {
#if UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7 || UNITY_4_8 || UNITY_4_9
                gameObject.SetActive(true);
#else
                gameObject.SetActiveRecursively(true);
#endif
                Start();
            }
        }

        prevTransition.Start();
    }
 public virtual void StartTransition(UIPanelManager.SHOW_MODE mode)
 {
     if (!this.m_started)
     {
         this.Start();
     }
     if (this.prevTransition != null)
     {
         this.prevTransition.StopSafe();
     }
     this.prevTransIndex = (int)mode;
     if (this.blockInput[this.prevTransIndex])
     {
         NrTSingleton <UIManager> .Instance.LockInput();
     }
     this.prevTransition = this.Transitions.list[this.prevTransIndex];
     if (this.deactivateAllOnDismiss && (mode == UIPanelManager.SHOW_MODE.BringInBack || mode == UIPanelManager.SHOW_MODE.BringInForward))
     {
         base.gameObject.SetActive(true);
         this.Start();
     }
     this.prevTransition.Start();
 }
예제 #5
0
 /// <summary>
 /// Returns a reference to the specified transition.
 /// </summary>
 /// <param name="transition">The enum identifying the transition to retrieve.</param>
 /// <returns>Returns a reference to the specified transition.  Null if none is found.</returns>
 public EZTransition GetTransition(UIPanelManager.SHOW_MODE transition)
 {
     return(GetTransition((int)transition));
 }