コード例 #1
0
 private void ClearTextInputVars()
 {
     this.m_inputActive = false;
     this.m_inputFocused = false;
     this.m_inputOwner = (GameObject) null;
     this.m_inputMaxCharacters = 0;
     this.m_inputUpdatedCallback = (UniversalInputManager.TextInputUpdatedCallback) null;
     this.m_inputCompletedCallback = (UniversalInputManager.TextInputCompletedCallback) null;
     this.m_inputCanceledCallback = (UniversalInputManager.TextInputCanceledCallback) null;
 }
コード例 #2
0
 public void UseTextInput(UniversalInputManager.TextInputParams parms, bool force = false)
 {
     if (!force && (UnityEngine.Object) parms.m_owner == (UnityEngine.Object) this.m_inputOwner)
       return;
     if ((UnityEngine.Object) this.m_inputOwner != (UnityEngine.Object) null && (UnityEngine.Object) this.m_inputOwner != (UnityEngine.Object) 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;
     this.m_inputText = parms.m_text ?? string.Empty;
     this.m_inputNormalizedRect = parms.m_rect;
     this.m_inputInitialScreenSize.x = (float) Screen.width;
     this.m_inputInitialScreenSize.y = (float) Screen.height;
     this.m_inputMaxCharacters = parms.m_maxCharacters;
     this.m_inputColor = parms.m_color;
     TextAnchor? nullable = parms.m_alignment;
     this.m_inputAlignment = !nullable.HasValue ? this.m_defaultInputAlignment : nullable.Value;
     this.m_inputFont = parms.m_font ?? this.m_defaultInputFont;
     this.m_inputNeedsFocus = true;
     this.m_inputIgnoreState = UniversalInputManager.TextInputIgnoreState.INVALID;
     this.m_inputKeepFocusOnComplete = parms.m_inputKeepFocusOnComplete;
     if (this.IsTextInputPassword())
       Input.imeCompositionMode = IMECompositionMode.Off;
     this.m_hideVirtualKeyboardOnComplete = parms.m_hideVirtualKeyboardOnComplete;
     if (!UniversalInputManager.Get().IsTouchMode() || !parms.m_showVirtualKeyboard)
       return;
 }