public void UpdateCurrentInputField() { if (m_eventSystem != null && m_eventSystem.currentSelectedGameObject != null && m_eventSystem.currentSelectedGameObject.activeInHierarchy) { if (m_eventSystem.currentSelectedGameObject != m_currentSelectedGameObject) { m_currentSelectedGameObject = m_eventSystem.currentSelectedGameObject; if (m_currentSelectedGameObject != null) { m_currentInputFieldTMP = m_currentSelectedGameObject.GetComponent <TMP_InputField>(); if (m_currentInputFieldTMP == null) { m_currentInputFieldUI = m_currentSelectedGameObject.GetComponent <InputField>(); } } else { if (m_currentInputFieldTMP != null) { m_currentInputFieldTMP.DeactivateInputField(); } m_currentInputFieldTMP = null; if (m_currentInputFieldUI != null) { m_currentInputFieldUI.DeactivateInputField(); } m_currentInputFieldUI = null; } } } else { m_currentSelectedGameObject = null; if (m_currentInputFieldTMP != null) { m_currentInputFieldTMP.DeactivateInputField(); } m_currentInputFieldTMP = null; if (m_currentInputFieldUI != null) { m_currentInputFieldUI.DeactivateInputField(); } m_currentInputFieldUI = null; } }
void HideInput() { inputField.DeactivateInputField(); inputField.gameObject.SetActive(false); PlayerController.LockCursor(true); scrollview.gameObject.SetActive(false); floatingScrollview.gameObject.SetActive(true); }
/// <summary> /// Completes the edit process. /// </summary> private void StopEditing() { if (textEntry != null && textEntry.gameObject.activeInHierarchy) { textEntry.DeactivateInputField(); } editing = false; }
private void DeactivateChatInput() { canvasGroup.interactable = false; inputField.gameObject.SetActive(false); sendButton.gameObject.SetActive(false); inputField.DeactivateInputField(); IsChatting = false; }
private void Awake() { consoleGO = GetComponentInChildren <Canvas>().gameObject; consoleInputField = GetComponentInChildren <TMP_InputField>(); consoleGO.SetActive(false); consoleInputField.DeactivateInputField(); myEventSystem = EventSystem.current; }
void DisableUI() { emailTextBox.DeactivateInputField(); passwordTextBox.DeactivateInputField(); confirmPasswordTextBox.DeactivateInputField(); backButton.interactable = false; signupButton.interactable = false; passwordErrorText.enabled = false; }
void DisableUI() { emailTextBox.DeactivateInputField(); passwordTextBox.DeactivateInputField(); signinButton.interactable = false; createAccountButton.interactable = false; emailErrorText.enabled = false; passwordErrorText.enabled = false; }
public void SendChatMessage() { string message = SteamClient.Name + ":" + chatMessageToSend.text; client.ourlobby.SendChatString(message); chatMessageToSend.text = ""; chatMessageToSend.DeactivateInputField(); chatMessageToSend.ReleaseSelection(); }
private void OnKeyboardClosed(VREvent_t args) { inputField.DeactivateInputField(); if (activeKeyboard != this) { return; } keyboardShowing = false; activeKeyboard = null; }
private void RefreshText(InputActionRebindingExtensions.RebindingOperation operation) { keybindInputField.text = operation.action.GetBindingDisplayString().Split('|')[0]; keybindInputField.DeactivateInputField(true); keybindInputField.OnDeselect(new BaseEventData(EventSystem.current)); keybindInputField.interactable = false; keybindInputField.interactable = true; operation.Dispose(); action.Enable(); }
void OnRevealText() { switch (passwordIF.contentType) { case TMP_InputField.ContentType.Password: passwordIF.contentType = TMP_InputField.ContentType.Standard; passwordIF.DeactivateInputField(); passwordIF.ActivateInputField(); break; case TMP_InputField.ContentType.Standard: passwordIF.contentType = TMP_InputField.ContentType.Password; passwordIF.DeactivateInputField(); passwordIF.ActivateInputField(); break; default: break; } }
private void Focus(bool focus) { if (focus && InputController.Current.Lock(this)) { _CommandLineInput.ActivateInputField(); } else { _CommandLineInput.DeactivateInputField(); InputController.Current.Unlock(this); } }
public void PreviousMessage(CallbackContext context) { if (!context.action.triggered) { return; } inputField.text = console.NavigatePreviousMessage(); inputField.DeactivateInputField(); inputField.ActivateInputField(); inputField.caretPosition = inputField.text.Length; }
// Update is called once per frame void Update() { if (active) { if (!inputField.isFocused) { inputField.ActivateInputField(); } if (indexChar < textTerminal.Length) { textMain.text += textTerminal[indexChar]; indexChar++; } } else { if (inputField.isFocused) { inputField.DeactivateInputField(); } } if (Time.timeScale < 0.1f) { inputField.DeactivateInputField(); } if (Input.GetKeyDown(KeyCode.End)) { mainCamera.enabled = true; terminalCamera.enabled = false; ActiveComp(true); inputField.DeactivateInputField(); inputField.interactable = false; textMain.text = ""; indexChar = 0; active = false; } }
public void LoadWaitingContent() { // Turn on the right context _inputField.DeactivateInputField(); _mainContents.gameObject.SetActive(false); _waitingScreen.gameObject.SetActive(true); _titleText.SetText("WAITING"); _loadingCircle.StartLoading(); isWaiting = true; }
public void DeactivateInputField() { if (unityInputField != null) { unityInputField.DeactivateInputField(); } #if USE_TEXT_MESH_PRO if (textMeshInputField != null) { textMeshInputField.DeactivateInputField(); } #endif }
public void ToggleCover(bool isActive) { if (isCovered) { Uncover(); } else { Cover(); } inputField.ActivateInputField(); inputField.DeactivateInputField(); }
public void SendMsg() { GameObject chatinput = GameObject.Find("ChatInput"); TMP_InputField messageInput = chatinput.GetComponent <TMP_InputField>(); string cMessage = messageInput.text; if (cMessage != "") { Send("CHATMSG|" + connectionId + '|' + myName + '|' + cMessage, reliableChannel); } messageInput.DeactivateInputField(); }
public void ChatSendMessage() { if (input.text.Length > 0f) { network.CommandMessage(input.text); input.text = ""; //input.DeactivateInputField(); } else if (input.text.Length == 0f) { input.text = ""; input.DeactivateInputField(); } }
private void OnKeyPressed(Key key) { string inputText = String.Empty; if (activeInputField != null) { inputText = activeInputField.text; } else if (activeTMPInputField != null) { inputText = activeTMPInputField.text; } switch (key.KeyCode) { case KeyCode.Backspace: if (inputText.Length > 0) { inputText = inputText.Remove(inputText.Length - 1); } break; case KeyCode.Return: if (activeInputField != null) { activeInputField.DeactivateInputField(); } else if (activeTMPInputField != null) { activeTMPInputField.DeactivateInputField(); } break; default: inputText += key.KeyCap; break; } if (activeInputField != null) { activeInputField.text = inputText; activeInputField.caretPosition = inputText.Length; } if (activeTMPInputField != null) { activeTMPInputField.text = inputText; activeTMPInputField.caretPosition = inputText.Length; } }
public void inEditMethod() { if (inEdit) { if (Input.GetKeyDown(KeyCode.Return) || Input.GetMouseButtonDown(0)) { //submit text to edit string fromField = inputField.text; short newValue; if (short.TryParse(fromField, out newValue)) { editingNode.Value = newValue; TempText.setTempText($"Node Value set to {newValue}", 1); editingNode = null; inEdit = false; inputField.text = ""; inputField.DeactivateInputField(); } else { TempText.setTempText($"Input failed because {fromField} is invalid!", 2); inputField.text = ""; //clear field inputField.ActivateInputField(); } } if (Input.GetKeyDown(KeyCode.X) || Input.GetKeyDown(KeyCode.Escape)) { inputField.text = ""; inputField.DeactivateInputField(); TempText.setTempText($"Editing Aborted", 1); inEdit = false; } return; // no other node controls while editing } }
// Update is called once per frame void Update() { if (testUsernameField.isFocused && Input.GetKeyDown(KeyCode.Tab)) { testUsernameField.DeactivateInputField(); testPWordField.ActivateInputField(); } if (testPWordField.isFocused) { if (Input.GetKeyDown(KeyCode.Return)) { LoginButtonClicked(); } } }
void SetFocus(string f) { if (f == "input") { focus = "console"; subFocus = "input"; console_InputField.ActivateInputField(); } else if (f == "log") { focus = "console"; subFocus = "log"; console_InputField.DeactivateInputField(); } else if (f == "documentation") { focus = "documentation"; subFocus = "main"; console_InputField.DeactivateInputField(); } }
public void OnTokenScreenCommit(Button b) { _tokenButton = b; _tokenButton.enabled = false; TokenField.DeactivateInputField(); var ctx = DiscordChatActor.Instance; Debug.Log($"{Log.Timestamp()} Sending Token to DiscordLauncher"); ctx.CreateClient(TokenField.text); ctx.Client.Ready += Client_Ready; ctx.FailedLogin += Client_FailedLogin; ctx.Run(TokenField.text); }
private IEnumerator WaitFrameAndDeselect() { _inputField.enabled = false; yield return(new WaitForEndOfFrame()); _inputField.DeactivateInputField(); if (InputSelected == null) { DevLogger.Warning("Event that returns MobileInputForm is null."); yield break; } ShowInputForm(InputSelected.Invoke()); _inputField.enabled = true; }
public void LoginButton() { string username = _usernameInput.text; string password = _passwordInput.text; if (string.IsNullOrEmpty(username) && string.IsNullOrEmpty(password)) { _message.SetText("Empty fields!"); return; } _loadingBar.SetActive(true); _usernameInput.DeactivateInputField(); _passwordInput.DeactivateInputField(); GameData.Instance.mongo.Login(username, password, LoginCallback); }
private void SubmitChanges(string changes) { if (changes != string.Empty) { placeholder.text = changes; } itemIF.text = string.Empty; //EventSystem.current.SetSelectedGameObject(null); itemIF.readOnly = true; itemIF.interactable = false; itemIF.DeactivateInputField(); EventSystem.current.SetSelectedGameObject(null); itemEditButton.gameObject.SetActive(true); }