/// <summary> /// Clicks the send button if on the last input field /// </summary> /// <param name="clickType"> The enter button ClickType </param> public void EnterButtonPressed(ClickType clickType) { if (clickType != ClickType.Down) { return; } if (popupManager.ActivePopupType != typeof(SendAssetPopup)) { return; } if (InputFieldUtils.GetActiveInputField() == LastSelectableField && okButton.interactable) { okButton.Press(); } else if (!advancedModeToggle.IsToggledOn) { simpleModeSelectableFields.MoveToNextSelectable(); } else { advancedModeSelectableFields.MoveToNextSelectable(); } }
/// <summary> /// Moves to the next input field /// </summary> /// <param name="clickType"> The tab button ClickType </param> public void EnterButtonPressed(ClickType clickType) { if (clickType != ClickType.Down) { return; } if (InputFieldUtils.GetActiveInputField() == password2Field.InputFieldBase && nextButton.interactable) { nextButton.Press(); } else { SelectableExtensions.MoveToNextSelectable(inputFields); } }
/// <summary> /// Loads the wallet if the button is enabled. /// </summary> /// <param name="clickType"> The enter button ClickType </param> public void EnterButtonPressed(ClickType clickType) { if (clickType != ClickType.Down || checkingWallet) { return; } if (InputFieldUtils.GetActiveInputField() == LastSelectableField && nextButton.interactable) { nextButton.Press(); } else { SelectableFields.MoveToNextSelectable(); } }
/// <summary> /// Clicks the send button if on the last input field /// </summary> /// <param name="clickType"> The enter button ClickType </param> public void EnterButtonPressed(ClickType clickType) { if (clickType != ClickType.Down) { return; } if (invalidTokenSection.activeInHierarchy && InputFieldUtils.GetActiveInputField() == decimalsField.InputFieldBase && okButton.interactable) { okButton.Press(); } else if (invalidTokenSection.activeInHierarchy) { selectableFields.MoveToNextSelectable(); } }
public void EnterButtonPressed(ClickType clickType) { if (clickType != ClickType.Down) { return; } Button button = confirmButton.gameObject.activeInHierarchy ? confirmButton : addContactButton; if (InputFieldUtils.GetActiveInputField() == inputFields[1] && button.interactable) { button.Press(); } else { inputFields.MoveToNextSelectable(); } }
/// <summary> /// Moves to next input field, unless at the last input field, then it presses the button if it is interactable /// </summary> /// <param name="clickType"> The enter button ClickType </param> public void EnterButtonPressed(ClickType clickType) { if (clickType != ClickType.Down) { return; } if (InputFieldUtils.GetActiveInputField() == currentPasswordField.InputFieldBase && nextButton.interactable) { nextButton.Press(); } else if (InputFieldUtils.GetActiveInputField() == newWalletNameField.InputFieldBase && saveWalletNameButton.interactable) { saveWalletNameButton.Press(); } else if (InputFieldUtils.GetActiveInputField() == confirmPasswordField.InputFieldBase && savePasswordButton.interactable) { savePasswordButton.Press(); } else { selectables.MoveToNextSelectable(); } }