public ITransition Dismiss(IWindow window) { HideTransition transition = new HideTransition(this, (Window)window, true); GetTransitionExecutor().Execute(transition); return transition.OnStateChanged((w, state) => { Debug.LogFormat("Dismiss Window:{0} State:{1}", w.Name, state); /* Control the layer of the window */ if (state == WindowState.INVISIBLE) this.MoveToLast(w); }); }
public ITransition Dismiss(IWindow window) { HideTransition transition = new HideTransition(this, (Window)window, true); GetTransitionExecutor().Execute(transition); return(transition.OnStateChanged((w, state) => { /* Control the layer of the window */ if (state == WindowState.INVISIBLE) { this.MoveToLast(w); } })); }
public virtual void Cancel() { Action sendEvent = () => { Action handler = Cancelled; if (handler != null) { handler(); } }; if (HideTransition != null) { Storyboard transition = HideTransition.Clone(); transition.Completed += (s, e) => sendEvent(); transition.Begin(this, Template); } else { sendEvent(); } }
protected virtual void Awake() { showTransition = GetComponent <ShowTransition>(); hideTransition = GetComponent <HideTransition>(); }