private void ClearTextInputVars() { this.m_inputActive = false; this.m_inputFocused = false; this.m_inputOwner = null; this.m_inputMaxCharacters = 0; this.m_inputUpdatedCallback = null; this.m_inputCompletedCallback = null; this.m_inputCanceledCallback = null; }
public void UseTextInput(TextInputParams parms, bool force = false) { if (force || (parms.m_owner != this.m_inputOwner)) { if ((this.m_inputOwner != null) && (this.m_inputOwner != parms.m_owner)) { this.ObjectCancelTextInput(parms.m_owner); } this.m_inputOwner = parms.m_owner; this.m_inputUpdatedCallback = parms.m_updatedCallback; this.m_inputPreprocessCallback = parms.m_preprocessCallback; this.m_inputCompletedCallback = parms.m_completedCallback; this.m_inputCanceledCallback = parms.m_canceledCallback; this.m_inputPassword = parms.m_password; this.m_inputNumber = parms.m_number; this.m_inputMultiLine = parms.m_multiLine; this.m_inputActive = true; this.m_inputFocused = false; if (parms.m_text == null) { } this.m_inputText = string.Empty; this.m_inputNormalizedRect = parms.m_rect; this.m_inputInitialScreenSize.x = Screen.width; this.m_inputInitialScreenSize.y = Screen.height; this.m_inputMaxCharacters = parms.m_maxCharacters; this.m_inputColor = parms.m_color; TextAnchor?alignment = parms.m_alignment; this.m_inputAlignment = !alignment.HasValue ? this.m_defaultInputAlignment : alignment.Value; if (parms.m_font == null) { } this.m_inputFont = this.m_defaultInputFont; this.m_inputNeedsFocus = true; this.m_inputIgnoreState = TextInputIgnoreState.INVALID; this.m_inputKeepFocusOnComplete = parms.m_inputKeepFocusOnComplete; if (this.IsTextInputPassword()) { Input.imeCompositionMode = IMECompositionMode.Off; } this.m_hideVirtualKeyboardOnComplete = parms.m_hideVirtualKeyboardOnComplete; if (Get().IsTouchMode() && parms.m_showVirtualKeyboard) { W8Touch.Get().ShowKeyboard(); } } }