public void DoShowBegin(AppearanceParameters parameters)
 {
     if (this.instance != null)
     {
         this.instance.DoShowBegin(parameters);
     }
 }
Exemplo n.º 2
0
        public override void DoShowBegin(AppearanceParameters parameters)
        {
            #region source macros UI.Windows.DoShowBegin.ImageComponent
            {
                if (this.imageResourceWait == true && this.imageResource.IsLoadable() == true)
                {
                    WindowSystemResources.LoadAuto(this, onDataLoaded: () => {
                        this.tempImagePlayOnShow = true;

                        if (this.playOnShow == true)
                        {
                            this.Play();
                        }
                    }, onComplete: () => {
                        base.DoShowBegin(parameters);
                    }, onShowHide: true,
                                                   onFailed: () => {
                        base.DoShowBegin(parameters);
                    });
                }
                else
                {
                    base.DoShowBegin(parameters);
                }
            }
            #endregion
        }
 public void SetActive(RectTransform obj, WindowComponent component, bool state)
 {
     if (state == true)
     {
         if (this.switchBehaviour == SwitchBehaviour.HideContent)
         {
             component.Show(AppearanceParameters.Default().ReplaceImmediately(immediately: true));
         }
         else if (this.switchBehaviour == SwitchBehaviour.ScaleContent)
         {
             obj.localScale = Vector3.one;
         }
     }
     else
     {
         if (this.switchBehaviour == SwitchBehaviour.HideContent)
         {
             component.Hide(AppearanceParameters.Default().ReplaceImmediately(immediately: true));
         }
         else if (this.switchBehaviour == SwitchBehaviour.ScaleContent)
         {
             obj.localScale = Vector3.zero;
         }
     }
 }
Exemplo n.º 4
0
        public virtual void BeginLoad()
        {
            if (this.noElements != null)
            {
                this.noElements.SetActive(false);
            }
            if (this.content != null)
            {
                this.content.SetActive(false);
            }

            if (this.loading != null)
            {
                this.loading.SetActive(true);
            }
            if (this.loader != null)
            {
                this.loader.Show(AppearanceParameters.Default().ReplaceForced(forced: true).ReplaceResetAnimation(resetAnimation: true));
            }

            if (this.verticalScrollbar != null)
            {
                this.verticalScrollbar.Hide(AppearanceParameters.Default().ReplaceForced(forced: true).ReplaceResetAnimation(resetAnimation: true));
            }
            if (this.horizontalScrollbar != null)
            {
                this.horizontalScrollbar.Hide(AppearanceParameters.Default().ReplaceForced(forced: true).ReplaceResetAnimation(resetAnimation: true));
            }

            this.SetLoadProgress(0);
        }
Exemplo n.º 5
0
 public void DoHideEnd(AppearanceParameters parameters)
 {
     foreach (var element in this.elements)
     {
         element.DoHideEnd(parameters);
     }
 }
Exemplo n.º 6
0
 protected override void DoLayoutShowEnd(AppearanceParameters parameters)
 {
     if (this.animationRoot != null)
     {
         (this.animationRoot as IWindowEventsController).DoShowEnd(parameters);
     }
 }
 public void DoHideEnd(AppearanceParameters parameters)
 {
     for (int i = 0; i < this.elements.Length; ++i)
     {
         this.elements[i].DoHideEnd(parameters);
     }
 }
Exemplo n.º 8
0
 protected override void DoLayoutShowEnd(AppearanceParameters parameters)
 {
     if (this.animationRoot != null)
     {
         this.animationRoot.DoShowEnd(parameters);
     }
 }
Exemplo n.º 9
0
 public void DoHideEnd(AppearanceParameters parameters)
 {
     if (this.instance != null)
     {
         this.instance.DoHideEnd(parameters);
     }
 }
 public void DoHideBegin(AppearanceParameters parameters)
 {
     this.StopCreate();
     if (this.instance != null)
     {
         this.instance.DoHideBegin(parameters);
     }
 }
 public void DoShowEnd(AppearanceParameters parameters)
 {
     if (this.instance != null)
     {
         this.instance.DoShowEnd(parameters);
         CanvasUpdater.ForceUpdate(this.GetLayoutInstance().canvas, this.GetLayoutInstance().canvasScaler);
     }
 }
        protected override void DoLayoutHideEnd(AppearanceParameters parameters)
        {
            var layout = this.GetCurrentLayout();

            if (layout != null)
            {
                layout.DoHideEnd(parameters);
            }
        }
        protected override void DoLayoutHideBegin(AppearanceParameters parameters)
        {
            //this.layout.DoWindowClose();
            var layout = this.GetCurrentLayout();

            if (layout != null)
            {
                layout.DoHideBegin(parameters);
            }
        }
Exemplo n.º 14
0
 protected override void DoLayoutHideBegin(AppearanceParameters parameters)
 {
     if (this.animationRoot != null)
     {
         (this.animationRoot as IWindowEventsController).DoHideBegin(parameters);
     }
     else
     {
         parameters.Call();
     }
 }
 public void DoHideEnd(AppearanceParameters parameters)
 {
     if (this.instance != null)
     {
         if (this.instance.IsInstantiate() == false)
         {
             this.instance.Setup(this.windowContext);
         }
         this.instance.DoHideEnd(parameters);
     }
 }
Exemplo n.º 16
0
 public void DoHideBegin(AppearanceParameters parameters)
 {
     if (this.instance != null)
     {
         this.instance.DoHideBegin(parameters);
     }
     else
     {
         parameters.Call();
     }
 }
Exemplo n.º 17
0
 protected override void DoLayoutHideBegin(AppearanceParameters parameters)
 {
     if (this.animationRoot != null)
     {
         this.animationRoot.DoWindowClose();
         this.animationRoot.DoHideBegin(parameters);
     }
     else
     {
         parameters.Call();
     }
 }
        public override void EndLoad()
        {
            base.EndLoad();

            if (this.dots != null)
            {
                this.dots.Show(AppearanceParameters.Default().ReplaceForced(forced: true).ReplaceResetAnimation(resetAnimation: true));
            }
            if (this.arrows != null)
            {
                this.arrows.Show(AppearanceParameters.Default().ReplaceForced(forced: true).ReplaceResetAnimation(resetAnimation: true));
            }
        }
        public override void BeginLoad()
        {
            base.BeginLoad();

            if (this.dots != null)
            {
                this.dots.Hide(AppearanceParameters.Default().ReplaceImmediately(immediately: true).ReplaceForced(forced: true).ReplaceResetAnimation(resetAnimation: true));
            }
            if (this.arrows != null)
            {
                this.arrows.Hide(AppearanceParameters.Default().ReplaceImmediately(immediately: true).ReplaceForced(forced: true).ReplaceResetAnimation(resetAnimation: true));
            }
        }
 public void DoShowBegin(AppearanceParameters parameters)
 {
     if (this.instance != null)
     {
         if (this.instance.IsInstantiate() == false)
         {
             this.instance.Setup(this.windowContext);
         }
         this.instance.DoShowBegin(parameters);
     }
     else
     {
         parameters.Call();
     }
 }
        public void SetActive(RectTransform obj, WindowComponent component, bool state, bool rebuildState)
        {
            if (rebuildState == true)
            {
                return;
            }

            if (state == true)
            {
                if (this.switchBehaviour == SwitchBehaviour.HideContent)
                {
                    component.Show(AppearanceParameters.Default().ReplaceImmediately(immediately: true));
                }
                else if (this.switchBehaviour == SwitchBehaviour.ScaleContent)
                {
                    if (obj.localScale != Vector3.one)
                    {
                        obj.localScale = Vector3.one;
                        (component as IWindowEventsController).DoWindowActive();
                        var canvas = obj.GetComponent <Canvas>();
                        if (canvas != null)
                        {
                            canvas.enabled = true;
                        }
                    }
                }
            }
            else
            {
                if (this.switchBehaviour == SwitchBehaviour.HideContent)
                {
                    component.Hide(AppearanceParameters.Default().ReplaceImmediately(immediately: true));
                }
                else if (this.switchBehaviour == SwitchBehaviour.ScaleContent)
                {
                    if (obj.localScale != Vector3.zero)
                    {
                        var canvas = obj.GetComponent <Canvas>();
                        if (canvas != null)
                        {
                            canvas.enabled = false;
                        }
                        (component as IWindowEventsController).DoWindowInactive();
                        obj.localScale = Vector3.zero;
                    }
                }
            }
        }
Exemplo n.º 22
0
        public virtual void BeginLoad()
        {
            if (this.noElements != null)
            {
                this.noElements.SetActive(false);
            }
            if (this.content != null)
            {
                this.content.SetActive(false);
            }

            if (this.loading != null)
            {
                this.loading.SetActive(true);
            }
            if (this.loader != null)
            {
                this.loader.Show(AppearanceParameters.Default().ReplaceForced(forced: true).ReplaceResetAnimation(resetAnimation: true));
            }
        }
Exemplo n.º 23
0
        public void EndLoad()
        {
            if (this.loading != null)
            {
                this.loading.SetActive(false);
            }
            if (this.loader != null)
            {
                this.loader.Hide(AppearanceParameters.Default().ReplaceForced(forced: true).ReplaceResetAnimation(resetAnimation: true));
            }

            if (this.noElements != null)
            {
                this.noElements.SetActive(this.IsEmpty() == true);
            }
            if (this.content != null)
            {
                this.content.SetActive(this.IsEmpty() == false);
            }
        }
Exemplo n.º 24
0
        public override void OnShowBegin(AppearanceParameters parameters)
        {
            #region source macros UI.Windows.OnShowBegin.ImageComponent
            {
                if (this.imageCrossFadeModule.IsValid() == true)
                {
                    this.imageCrossFadeModule.Prepare(this);
                }

                if (this.imageLocalizationKey.IsNone() == false)
                {
                    if ((this.imageResource.controlType & ResourceAuto.ControlType.Show) != 0)
                    {
                        this.SetImage(this.imageLocalizationKey);
                    }
                }
                else
                {
                    WindowSystemResources.LoadAuto(this, onDataLoaded: () => {
                        if (this.playOnShow == true)
                        {
                            this.Play();
                        }
                    }, onComplete: null, onShowHide: true);
                }

                if (this.tempImagePlayOnShow == true)
                {
                    if (this.playOnShow == true)
                    {
                        this.Play();
                    }
                }
            }
            #endregion

            base.OnShowBegin(parameters);
        }
Exemplo n.º 25
0
        public virtual void EndLoad()
        {
            if (this.loading != null)
            {
                this.loading.SetActive(false);
            }
            if (this.loader != null)
            {
                this.loader.Hide(AppearanceParameters.Default().ReplaceForced(forced: true).ReplaceResetAnimation(resetAnimation: true));
            }

            if (this.noElements != null)
            {
                this.noElements.SetActive(this.IsEmpty() == true);
            }
            if (this.content != null)
            {
                this.content.SetActive(this.IsEmpty() == false);
            }

            this.TryToHideScrollbars();

            this.SetLoadProgress(100);
        }
Exemplo n.º 26
0
		protected override void DoLayoutShowEnd(AppearanceParameters parameters) {

			if (this.animationRoot != null) this.animationRoot.DoShowEnd(parameters);

		}
Exemplo n.º 27
0
		protected override void DoLayoutHideBegin(AppearanceParameters parameters) {

			if (this.animationRoot != null) {
				
				this.animationRoot.DoWindowClose();
				this.animationRoot.DoHideBegin(parameters);

			} else {

				parameters.Call();

			}

		}
Exemplo n.º 28
0
 protected override void DoLayoutHideBegin(AppearanceParameters parameters)
 {
     this.layout.DoWindowClose();
     this.layout.DoHideBegin(parameters);
 }
Exemplo n.º 29
0
            public void DoHideBegin(AppearanceParameters parameters)
            {
                var callback = parameters.callback;

                ME.Utilities.CallInSequence(callback, this.elements, (e, c) => { e.DoHideBegin(parameters.ReplaceCallback(c)); });
            }
Exemplo n.º 30
0
 protected override void DoLayoutHideEnd(AppearanceParameters parameters)
 {
     this.layout.DoHideEnd(parameters);
 }
Exemplo n.º 31
0
        public void DoShowEnd(AppearanceParameters parameters)
        {
            this.instance.DoShowEnd(parameters);

            CanvasUpdater.ForceUpdate(this.instance.canvas, this.instance.canvasScaler);
        }
Exemplo n.º 32
0
 public void DoHideBegin(AppearanceParameters parameters)
 {
     this.instance.DoHideBegin(parameters);
 }