private void DoHideBeginManualControl(AppearanceParameters parameters) { if (this.IsStateReadyToHide() == false && parameters.GetForced(defaultValue: false) == false) { parameters.Call(); return; } for (int i = 0; i < this.subComponents.Count; ++i) { var sub = this.subComponents[i] as WindowComponentBase; sub.DoHideBeginManualControl(parameters.ReplaceCallback(null)); } WindowSystem.RunSafe(this.OnHideBegin); WindowSystem.RunSafe(this.OnHideBegin, parameters); parameters.Call(); }
public void DoHideBegin(TransitionBase transition, TransitionInputParameters transitionParameters, AppearanceParameters parameters) { if (transition != null) { transition.Play(this.window, transitionParameters, null, forward: false, callback: parameters.callback); } else { parameters.Call(); } }
public override void DoHideBegin(AppearanceParameters parameters) { if (this.manualShowHideControl == true) { parameters.Call(); return; } this.eventsHistoryTracker.Add(this, parameters, HistoryTrackerEventType.HideBegin); this.DoHideBegin_INTERNAL(parameters); }
public void Hide(AppearanceParameters parameters) { if (this.IsStateReadyToHide() == false && parameters.GetForced(defaultValue: false) == false) { this.RefreshComponentState(); parameters.Call(); return; } this.Hide_INTERNAL(parameters); }
public override void DoShowBegin(AppearanceParameters parameters) { if (parameters.GetManual(false) == true) { this.Show(parameters); return; } if (this.manualShowHideControl == true || this.showOnStart == false) { parameters.Call(); return; } this.eventsHistoryTracker.Add(this, parameters, HistoryTrackerEventType.ShowBegin); this.DoShowBegin_INTERNAL(parameters); }
public virtual void DoHideBegin(AppearanceParameters parameters) { this.SetComponentState(WindowObjectState.Hiding); WindowSystem.RunSafe(this.OnHideBegin); WindowSystem.RunSafe(this.OnHideBegin, parameters); var includeChilds = parameters.GetIncludeChilds(defaultValue: true); if (includeChilds == true) { var callback = parameters.callback; ME.Utilities.CallInSequence(callback, this.subComponents, (item, cb) => (item as IWindowEventsController).DoHideBegin(parameters.ReplaceCallback(cb))); } else { parameters.Call(); } }
public override void DoHideBegin(AppearanceParameters parameters) { if (parameters.GetManual(false) == true) { this.Hide(parameters); return; } if (this.manualShowHideControl == true) { parameters.Call(); return; } WindowSystem.GetHistoryTracker().Add(this, parameters, HistoryTrackerEventType.HideBegin); this.DoHideBegin_INTERNAL(parameters); }
public void DoShowBegin(TransitionBase transition, TransitionInputParameters transitionParameters, AppearanceParameters parameters) { if (transition != null) { transition.SetResetState(transitionParameters, this.window, null); transition.Play(this.window, transitionParameters, null, forward: true, callback: parameters.callback); } else { // Reset to defaults var layoutWindow = (this.window as LayoutWindowType); if (layoutWindow != null) { layoutWindow.layout.GetLayoutInstance().root.Reset(); } parameters.Call(); } }
public virtual void DoHideBegin(AppearanceParameters parameters) { this.SetComponentState(WindowObjectState.Hiding); this.OnHideBegin(); this.OnHideBegin(parameters); #pragma warning disable this.OnHideBegin(parameters.callback, parameters.immediately); #pragma warning restore var includeChilds = parameters.GetIncludeChilds(defaultValue: true); if (includeChilds == true) { var callback = parameters.callback; ME.Utilities.CallInSequence(callback, this.subComponents, (item, cb) => item.DoHideBegin(parameters.ReplaceCallback(cb))); } else { parameters.Call(); } }
public void Hide(AppearanceParameters parameters) { if ((this.GetComponentState() == WindowObjectState.Hidden || this.GetComponentState() == WindowObjectState.Hiding) && parameters.GetForced(defaultValue: false) == false) { parameters.Call(); return; } this.eventsHistoryTracker.Add(this, parameters, HistoryTrackerEventType.HideManual); this.manualShowHideControl = true; //parameters = parameters.ReplaceManual(manual: true); var callback = parameters.callback; parameters.callback = () => { if (this.GetComponentState() != WindowObjectState.Hiding) { if (callback != null) { callback.Invoke(); } return; } this.DoHideEnd_INTERNAL(parameters); if (callback != null) { callback.Invoke(); } }; this.DoHideBegin_INTERNAL(parameters); }
public void Hide(AppearanceParameters parameters) { if (this.IsStateReadyToHide() == false && parameters.GetForced(defaultValue: false) == false) { parameters.Call(); return; } WindowSystem.GetHistoryTracker().Add(this, parameters, HistoryTrackerEventType.HideManual); this.manualShowHideControl = true; //parameters = parameters.ReplaceManual(manual: true); var callback = parameters.GetCallback(null); var parametersResult = parameters.ReplaceCallback(() => { if (this.GetComponentState() != WindowObjectState.Hiding) { if (callback != null) { callback.Invoke(); } return; } this.DoHideEnd_INTERNAL(parameters); if (callback != null) { callback.Invoke(); } }); parametersResult = parametersResult.ReplaceForced(forced: true); this.DoHideBegin_INTERNAL(parametersResult); }
public void DoShowBegin(TransitionBase transition, TransitionInputParameters transitionParameters, AppearanceParameters parameters) { var needToPlay = (this.id > 0 || this.playType == PlayType.Replace); if (this.playType == PlayType.Replace) WindowSystem.AudioStop(null, this.clipType, this.id); if (transition != null) { if (needToPlay == true) { WindowSystem.AudioPlay(this.window, this.clipType, this.id, this.playType == PlayType.Replace); transition.SetResetState(transitionParameters, this.window, null); transition.Play(this.window, transitionParameters, null, forward: true, callback: () => { parameters.Call(); }); } } else { if (needToPlay == true) WindowSystem.AudioPlay(this.window, this.clipType, this.id, this.playType == PlayType.Replace); parameters.Call(); } }
public void DoHideBegin(AppearanceParameters parameters) { this.ReleaseEvents(WindowEventType.OnHideBegin); parameters.Call(); }
private void DoHideBegin_INTERNAL(AppearanceParameters parameters) { if (this.IsStateReadyToHide() == false && parameters.GetForced(defaultValue: false) == false) { this.RefreshComponentState(); parameters.Call(); return; } this.SetComponentState(WindowObjectState.Hiding); WindowSystem.GetEvents().Raise(this, WindowEventType.OnHideBegin); var window = this.GetWindow(); if (window != null) { var canvas = window.GetCanvas(); if (canvas != null) { canvas.pixelPerfect = false; } } var parametersCallback = parameters.callback; System.Action onResult = () => { if (window != null) { var canvas = window.GetCanvas(); if (canvas != null) { WindowSystem.ApplyToSettingsInstance(null, canvas, this.GetWindow()); } } if (parametersCallback != null) { parametersCallback.Invoke(); } }; #if DEBUGBUILD Profiler.BeginSample("WindowComponentBase::OnHideBegin()"); #endif WindowSystem.RunSafe(this.OnHideBegin); WindowSystem.RunSafe(this.OnHideBegin, parameters); #if DEBUGBUILD Profiler.EndSample(); #endif var includeChilds = parameters.GetIncludeChilds(defaultValue: true); #region Include Childs if (includeChilds == false) { // without childs this.DoHideBeginAnimation_INTERNAL(onResult, parameters); return; } #endregion this.RunChilds_INTERNAL(parameters, onResult, this.DoHideBeginAnimation_INTERNAL, (e, p) => e.DoHideBegin(p)); /* * var childsBehaviour = parameters.GetChildsBehaviourMode(this.childsHideMode); * if (childsBehaviour == ChildsBehaviourMode.Simultaneously) { * #region Childs Simultaneously * var counter = 0; * System.Action callback = () => { * ++counter; * if (counter < 2) return; * * onResult.Invoke(); * * }; * * this.DoHideBeginAnimation_INTERNAL(callback, parameters); * * ME.Utilities.CallInSequence(callback, this.subComponents, (e, c) => { * * e.DoHideBegin(parameters.ReplaceCallback(c)); * * }); #endregion * * } else if (childsBehaviour == ChildsBehaviourMode.Consequentially) { * #region Childs Consequentially * ME.Utilities.CallInSequence(() => { * * this.DoHideBeginAnimation_INTERNAL(onResult, parameters); * * }, this.subComponents, (e, c) => { * * e.DoHideBegin(parameters.ReplaceCallback(c)); * * }, waitPrevious: true); #endregion * * }*/ }
public override void DoHideBegin(AppearanceParameters parameters) { if (this.manualShowHideControl == true) { parameters.Call(); return; } this.eventsHistoryTracker.Add(this, parameters, HistoryTrackerEventType.HideBegin); this.DoHideBegin_INTERNAL(parameters); }
private void DoHideBegin_INTERNAL(AppearanceParameters parameters) { if ((this.GetComponentState() == WindowObjectState.Hiding || this.GetComponentState() == WindowObjectState.Hidden) && parameters.GetForced(defaultValue: false) == false) { parameters.Call(); return; } this.SetComponentState(WindowObjectState.Hiding); WindowSystem.GetEvents().Raise(this, WindowEventType.OnHideBegin); var parametersCallback = parameters.callback; System.Action onResult = () => { if (parametersCallback != null) { parametersCallback.Invoke(); } }; #if DEBUGBUILD Profiler.BeginSample("WindowComponentBase::OnHideBegin()"); #endif WindowSystem.RunSafe(this.OnHideBegin); WindowSystem.RunSafe(this.OnHideBegin, parameters); #if DEBUGBUILD Profiler.EndSample(); #endif var includeChilds = parameters.GetIncludeChilds(defaultValue: true); #region Include Childs if (includeChilds == false) { // without childs this.DoHideBeginAnimation_INTERNAL(onResult, parameters); return; } #endregion var childsBehaviour = parameters.GetChildsBehaviourMode(this.childsHideMode); if (childsBehaviour == ChildsBehaviourMode.Simultaneously) { #region Childs Simultaneously var counter = 0; System.Action callback = () => { ++counter; if (counter < 2) { return; } onResult.Invoke(); }; this.DoHideBeginAnimation_INTERNAL(callback, parameters); ME.Utilities.CallInSequence(callback, this.subComponents, (e, c) => { e.DoHideBegin(parameters.ReplaceCallback(c)); }); #endregion } else if (childsBehaviour == ChildsBehaviourMode.Consequentially) { #region Childs Consequentially ME.Utilities.CallInSequence(() => { this.DoHideBeginAnimation_INTERNAL(onResult, parameters); }, this.subComponents, (e, c) => { e.DoHideBegin(parameters.ReplaceCallback(c)); }, waitPrevious: true); #endregion } }
private void DoHideBegin_INTERNAL(AppearanceParameters parameters) { if ((this.GetComponentState() == WindowObjectState.Hiding || this.GetComponentState() == WindowObjectState.Hidden) && parameters.GetForced(defaultValue: false) == false) { parameters.Call(); return; } this.SetComponentState(WindowObjectState.Hiding); var parametersCallback = parameters.callback; System.Action onResult = () => { parameters = parameters.ReplaceCallback(parametersCallback); parameters.Call(); }; this.OnHideBegin(); this.OnHideBegin(parameters); #pragma warning disable this.OnHideBegin(parameters.callback, parameters.resetAnimation); #pragma warning restore var includeChilds = parameters.GetIncludeChilds(defaultValue: true); #region Include Childs if (includeChilds == false) { // without childs this.DoHideBeginAnimation_INTERNAL(onResult, parameters); return; } #endregion var childsBehaviour = parameters.GetChildsBehaviourMode(this.childsHideMode); if (childsBehaviour == ChildsBehaviourMode.Simultaneously) { #region Childs Simultaneously var counter = 0; System.Action callback = () => { ++counter; if (counter < 2) { return; } onResult.Invoke(); }; this.DoHideBeginAnimation_INTERNAL(callback, parameters); ME.Utilities.CallInSequence(callback, this.subComponents, (e, c) => { e.DoHideBegin(parameters.ReplaceCallback(c)); }); #endregion } else if (childsBehaviour == ChildsBehaviourMode.Consequentially) { #region Childs Consequentially ME.Utilities.CallInSequence(() => { this.DoHideBeginAnimation_INTERNAL(onResult, parameters); }, this.subComponents, (e, c) => { e.DoHideBegin(parameters.ReplaceCallback(c)); }, waitPrevious: true); #endregion } }
private void DoHideBegin_INTERNAL(AppearanceParameters parameters) { if ((this.GetComponentState() == WindowObjectState.Hiding || this.GetComponentState() == WindowObjectState.Hidden) && parameters.GetForced(defaultValue: false) == false) { parameters.Call(); return; } this.SetComponentState(WindowObjectState.Hiding); var parametersCallback = parameters.callback; System.Action onResult = () => { parameters = parameters.ReplaceCallback(parametersCallback); parameters.Call(); }; this.OnHideBegin(); this.OnHideBegin(parameters); #pragma warning disable this.OnHideBegin(parameters.callback, parameters.resetAnimation); #pragma warning restore var includeChilds = parameters.GetIncludeChilds(defaultValue: true); #region Include Childs if (includeChilds == false) { // without childs this.DoHideBeginAnimation_INTERNAL(onResult, parameters); return; } #endregion var childsBehaviour = parameters.GetChildsBehaviourMode(this.childsHideMode); if (childsBehaviour == ChildsBehaviourMode.Simultaneously) { #region Childs Simultaneously var counter = 0; System.Action callback = () => { ++counter; if (counter < 2) return; onResult.Invoke(); }; this.DoHideBeginAnimation_INTERNAL(callback, parameters); ME.Utilities.CallInSequence(callback, this.subComponents, (e, c) => { e.DoHideBegin(parameters.ReplaceCallback(c)); }); #endregion } else if (childsBehaviour == ChildsBehaviourMode.Consequentially) { #region Childs Consequentially ME.Utilities.CallInSequence(() => { this.DoHideBeginAnimation_INTERNAL(onResult, parameters); }, this.subComponents, (e, c) => { e.DoHideBegin(parameters.ReplaceCallback(c)); }, waitPrevious: true); #endregion } }
private void DoShowBegin_INTERNAL(AppearanceParameters parameters) { if ((this.GetComponentState() == WindowObjectState.Showing || this.GetComponentState() == WindowObjectState.Shown) && parameters.GetForced(defaultValue: false) == false) { parameters.Call(); return; } this.SetComponentState(WindowObjectState.Showing); var parametersCallback = parameters.callback; System.Action onResult = () => { parameters = parameters.ReplaceCallback(parametersCallback); parameters.Call(); }; #if UNITY_EDITOR Profiler.BeginSample("WindowComponentBase::OnShowBegin()"); #endif this.OnShowBegin(); this.OnShowBegin(parameters); #pragma warning disable this.OnShowBegin(parameters.callback, parameters.resetAnimation); #pragma warning restore #if UNITY_EDITOR Profiler.EndSample(); #endif var includeChilds = parameters.GetIncludeChilds(defaultValue: true); /*var resetAnimation = parameters.GetResetAnimation(defaultValue: true); * if (resetAnimation == true) { * * if (includeChilds == true) { * * this.DoResetState(); * * } else { * * this.SetResetState(); * * } * * }*/ #region Include Childs if (includeChilds == false) { // without childs this.DoShowBeginAnimation_INTERNAL(onResult, parameters); return; } #endregion var childsBehaviour = parameters.GetChildsBehaviourMode(this.childsShowMode); if (childsBehaviour == ChildsBehaviourMode.Simultaneously) { #region Childs Simultaneously var counter = 0; System.Action callback = () => { ++counter; if (counter < 2) { return; } onResult.Invoke(); }; this.DoShowBeginAnimation_INTERNAL(callback, parameters); ME.Utilities.CallInSequence(callback, this.subComponents, (e, c) => { e.DoShowBegin(parameters.ReplaceCallback(c)); }); #endregion } else if (childsBehaviour == ChildsBehaviourMode.Consequentially) { #region Childs Consequentially ME.Utilities.CallInSequence(() => { this.DoShowBeginAnimation_INTERNAL(onResult, parameters); }, this.subComponents, (e, c) => { e.DoShowBegin(parameters.ReplaceCallback(c)); }, waitPrevious: true); #endregion } }
public void DoHideBegin(TransitionBase transition, TransitionInputParameters transitionParameters, AppearanceParameters parameters) { parameters.Call(); }
/// <summary> /// Raises the layout hide begin event. /// </summary> /// <param name="callback">Callback.</param> protected virtual void DoLayoutHideBegin(AppearanceParameters parameters) { parameters.Call(); }