public void Hide() { isVisible = false; canvas.enabled = isVisible; graphicRaycaster.enabled = isVisible; consoleInput.OnDeselect(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(); }
public void Submit(bool resumeTyping = true) { RunCommand(inputField.text); // Clear the inputfield inputField.text = string.Empty; if (resumeTyping) { inputField.Select(); inputField.ActivateInputField(); } else { EventSystem.current.SetSelectedGameObject(null); inputField.OnDeselect(null); } }
/// <summary> /// Closes the console. /// </summary> public void Close() { IsOpen = false; //Disable the canvas group canvasGroup.alpha = 0.0f; canvasGroup.interactable = false; canvasGroup.blocksRaycasts = false; //Disable the input field inputField.interactable = false; inputField.OnDeselect(null); EventSystem.current.SetSelectedGameObject(null); //Clear the input field of the key used to open/close the console inputField.text = inputField.text.Replace("`", string.Empty); }