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); } }
public void GoHomeByKeyHome(UpdateEvent e, SingleNode <HomeButtonComponent> node) { if (Input.GetKeyDown(KeyCode.Home) && !InputFieldComponent.IsAnyInputFieldInFocus()) { MainScreenComponent.Instance.ClearHistory(); base.ScheduleEvent <ShowScreenDownEvent <MainScreenComponent> >(node); } }
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); } } }
private void Show() { EscapeQueue.AddHandler(this); VisibilityToggleGameObject.SetActive(true); InputFieldComponent.Select(); Showing = true; }
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(); } }
private void ValidateInputAfterChanging(InputFieldComponent input, ESMComponent inputStateESM, InteractivityPrerequisiteESMComponent interactivityPrerequisiteESM, int maxLength) { string str = input.Input; if (string.IsNullOrEmpty(str)) { this.SetNotAcceptableState(interactivityPrerequisiteESM); } else { if (str.Length > maxLength) { input.Input = str.Remove(maxLength); } interactivityPrerequisiteESM.Esm.ChangeState <InteractivityPrerequisiteStates.AcceptableState>(); } inputStateESM.Esm.ChangeState <InputFieldStates.NormalState>(); }
private void Awake() { this.inputField = base.gameObject.GetComponent <InputFieldComponent>(); }
public InviteScreenComponent(InputFieldComponent inviteField) { this.InviteField = inviteField; }
void Awake() { instance = this; //text = this.transform.Find("InputText").GetComponent<Text>(); }
private void SetInvalidAndNotAccetableState(InputFieldComponent inputField, ESMComponent inputESM, string errorMessage, InteractivityPrerequisiteESMComponent interactivityPrerequisiteESM) { inputESM.Esm.ChangeState <InputFieldStates.InvalidState>(); inputField.ErrorMessage = errorMessage; this.SetNotAcceptableState(interactivityPrerequisiteESM); }