Ejemplo n.º 1
0
 public void GoHomeByKeyHome(UpdateEvent e, SingleNode <MainScreenComponent> node)
 {
     if (Input.GetKeyDown(KeyCode.Home) && !InputFieldComponent.IsAnyInputFieldInFocus())
     {
         node.component.ShowHome();
     }
 }
 private void Update()
 {
     if ((this.entity != null) && (!this.disabled && (!InputFieldComponent.IsAnyInputFieldInFocus() && InputMapping.Cancel)))
     {
         base.ScheduleEvent <T>(this.entity);
     }
 }
Ejemplo n.º 3
0
 public void GoHomeByKeyHome(UpdateEvent e, SingleNode <HomeButtonComponent> node)
 {
     if (Input.GetKeyDown(KeyCode.Home) && !InputFieldComponent.IsAnyInputFieldInFocus())
     {
         MainScreenComponent.Instance.ClearHistory();
         base.ScheduleEvent <ShowScreenDownEvent <MainScreenComponent> >(node);
     }
 }
Ejemplo n.º 4
0
 private void Update()
 {
     if (this.immediate)
     {
         this.targetPos = this.GetElementPos(this.targetElement);
     }
     if (!Mathf.Approximately(this.GetPos(), this.targetPos))
     {
         float b        = this.speed * Time.deltaTime;
         float deltaPos = this.targetPos - this.GetPos();
         if (this.immediate)
         {
             this.Move(deltaPos);
             this.immediate = false;
         }
         else
         {
             float num3 = (deltaPos < 0f) ? -Mathf.Min(-deltaPos, b) : Mathf.Min(deltaPos, b);
             this.Move(num3);
         }
     }
     if (Input.GetButtonDown("MoveRight"))
     {
         if (!InputFieldComponent.IsAnyInputFieldInFocus())
         {
             this.ScrollRight();
         }
     }
     else if (Input.GetButtonDown("MoveLeft") && !InputFieldComponent.IsAnyInputFieldInFocus())
     {
         this.ScrollLeft();
     }
     if (TutorialCanvas.Instance.IsShow)
     {
         if (this.leftButton.gameObject.activeSelf)
         {
             this.leftButton.gameObject.SetActive(false);
         }
         if (this.rightButton.gameObject.activeSelf)
         {
             this.rightButton.gameObject.SetActive(false);
         }
     }
     else
     {
         float num4 = 1E-06f;
         bool  flag = (this.ElementsCount > 1) && (this.GetPos() > (this.GetElementPos(1) - num4));
         if (flag != this.leftButton.gameObject.activeSelf)
         {
             this.leftButton.gameObject.SetActive(flag);
         }
         bool flag2 = (this.ElementsCount > 1) && (this.GetPos() < (this.GetElementPos(this.ElementsCount - 2) + num4));
         if (flag2 != this.rightButton.gameObject.activeSelf)
         {
             this.rightButton.gameObject.SetActive(flag2);
         }
     }
 }
Ejemplo n.º 5
0
 public void GoBackByKey(UpdateEvent e, SingleNode <MainScreenComponent> node, [JoinAll] ICollection <CancelNotificationNode> cancelNotifications)
 {
     if ((Event.current != null) && Event.current.isMouse)
     {
         base.ScheduleEvent <HangarCameraDelayAutoRotateEvent>(node);
     }
     if (InputMapping.Cancel && (!InputFieldComponent.IsAnyInputFieldInFocus() && (node.component.HasHistory() && ((cancelNotifications.Count == 0) && TutorialCanvas.Instance.AllowCancelHandler))))
     {
         node.component.GoBack();
     }
 }