static int DeactivateInputField(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 1); UnityEngine.UI.InputField obj = (UnityEngine.UI.InputField)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UnityEngine.UI.InputField"); obj.DeactivateInputField(); return(0); }
static int DeactivateInputField(IntPtr L) { L.ChkArgsCount(1); UnityEngine.UI.InputField obj = (UnityEngine.UI.InputField)L.ChkUnityObjectSelf(1, "UnityEngine.UI.InputField"); obj.DeactivateInputField(); return(0); }
static public int DeactivateInputField(IntPtr l) { try { UnityEngine.UI.InputField self = (UnityEngine.UI.InputField)checkSelf(l); self.DeactivateInputField(); return(0); } catch (Exception e) { return(error(l, e)); } }
/// <summary> /// Non-Propagating input event handler. Called on a view when it blurs. /// </summary> public override void HandleBlur() { base.HandleBlur(); // If the input field is focused, blur it if (InputFieldComponent.isFocused == true) { InputFieldComponent.DeactivateInputField(); } UpdateState(); }
static int DeactivateInputField(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); UnityEngine.UI.InputField obj = (UnityEngine.UI.InputField)ToLua.CheckObject <UnityEngine.UI.InputField>(L, 1); obj.DeactivateInputField(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
void InternalClose() { if (open) { open = false; ClearTildeKeyInput(); inputField.DeactivateInputField(); inputField.enabled = false; InputManager.ClearUIFocus(); var fpsCounter = Bowhead.GameManager.instance.fpsCounter; if (fpsCounter != null) { fpsCounter.fpsCounter.Anchor = fpsAnchor; fpsCounter.memoryCounter.Anchor = memAnchor; fpsCounter.deviceInfoCounter.Anchor = gpuAnchor; } } }
// Update is called once per frame void Update() { if (Input.GetButtonDown("Submit") == true) { if (activeField == false) { activeField = true; TextField.interactable = true; TextField.ActivateInputField(); TextField.Select(); walkingSpeed = SlowSpeed; } else { //submit and disable text box activeField = false; TextField.interactable = false; activeEnemyManager.CheckList(TextField.text); TextField.DeactivateInputField(); TextField.text = ""; walkingSpeed = NormalSpeed; } } if (Input.GetButtonDown("Shoot") && activeField == true) { //submit only. does not disable text box //Debug.Log(TextField.text + '+'); int strlen = TextField.text.Length; //Debug.Log(TextField.text.Substring(0, strlen - 1) + '+'); if (strlen > 0) { activeEnemyManager.CheckList(TextField.text.Substring(0, strlen - 1)); } TextField.text = ""; } if (Input.GetKeyDown(KeyCode.Comma)) { SceneManager.LoadScene(1); } }
//-------------------------------------------------------------------------------- #region Private Methods void UpdatePrompt() { if (!gameObject.activeInHierarchy) { return; } RectTransform promptR = prompt.GetComponent <RectTransform>(); string promptStr; if (demoScript.interpreter.NeedMoreInput()) { promptStr = ". . . > "; promptR.sizeDelta = new Vector2(60, promptR.sizeDelta.y); } else if (demoScript.interpreter.Running()) { promptStr = null; } else { promptStr = "> "; promptR.sizeDelta = new Vector2(25, promptR.sizeDelta.y); } prompt.text = promptStr; RectTransform inputR = input.GetComponent <RectTransform>(); inputR.anchoredPosition = new Vector2(promptR.sizeDelta.x, inputR.anchoredPosition.y); if (promptStr == null) { input.DeactivateInputField(); input.gameObject.SetActive(false); } else { input.gameObject.SetActive(true); input.ActivateInputField(); } }