예제 #1
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);
        }
 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;
         }
     }
 }
        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 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;
                    }
                }
            }
        }
예제 #6
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);
            }
        }
        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));
            }
        }
예제 #8
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);
        }