private void ShowInput(bool fromActivate = true)
    {
        Bounds bounds = this.m_searchText.GetBounds();

        this.m_searchText.gameObject.SetActive(false);
        Rect  rect     = CameraUtils.CreateGUIViewportRect(Box.Get().GetCamera(), bounds.min, bounds.max);
        Color?nullable = null;

        if (W8Touch.Get().IsVirtualKeyboardVisible())
        {
            nullable = new Color?(this.m_altSearchColor);
        }
        UniversalInputManager.TextInputParams parms = new UniversalInputManager.TextInputParams {
            m_owner             = base.gameObject,
            m_rect              = rect,
            m_updatedCallback   = new UniversalInputManager.TextInputUpdatedCallback(this.OnInputUpdated),
            m_completedCallback = new UniversalInputManager.TextInputCompletedCallback(this.OnInputComplete),
            m_canceledCallback  = new UniversalInputManager.TextInputCanceledCallback(this.OnInputCanceled),
            m_font              = this.m_searchText.GetLocalizedFont(),
            m_text              = this.m_text,
            m_color             = nullable
        };
        parms.m_showVirtualKeyboard = fromActivate;
        UniversalInputManager.Get().UseTextInput(parms, false);
    }
Example #2
0
    private void ShowInput(bool fromAwake)
    {
        Rect rect = CameraUtils.CreateGUIViewportRect(BaseUI.Get().GetBnetCamera(), (Component)this.m_Bones.m_InputTopLeft, (Component)this.m_Bones.m_InputBottomRight);

        UniversalInputManager.TextInputParams parms = new UniversalInputManager.TextInputParams {
            m_owner = base.gameObject,
            m_rect  = rect,
            m_preprocessCallback = new UniversalInputManager.TextInputPreprocessCallback(this.OnInputPreprocess),
            m_completedCallback  = new UniversalInputManager.TextInputCompletedCallback(this.OnInputComplete),
            m_canceledCallback   = new UniversalInputManager.TextInputCanceledCallback(this.OnInputCanceled),
            m_font          = this.m_localizedInputFont,
            m_maxCharacters = 0x200,
            m_touchScreenKeyboardHideInput  = true,
            m_showVirtualKeyboard           = fromAwake,
            m_hideVirtualKeyboardOnComplete = !fromAwake ? false : true
        };
        UniversalInputManager.Get().UseTextInput(parms, false);
    }
Example #3
0
    private void ShowInput()
    {
        this.m_inputText.gameObject.SetActive(false);
        Camera camera = CameraUtils.FindFirstByLayer(base.gameObject.layer);
        Bounds bounds = this.m_inputText.GetBounds();
        Rect   rect   = CameraUtils.CreateGUIViewportRect(camera, bounds.min, bounds.max);

        UniversalInputManager.TextInputParams parms = new UniversalInputManager.TextInputParams {
            m_owner             = base.gameObject,
            m_password          = true,
            m_rect              = rect,
            m_updatedCallback   = new UniversalInputManager.TextInputUpdatedCallback(this.OnInputUpdated),
            m_completedCallback = new UniversalInputManager.TextInputCompletedCallback(this.OnInputComplete),
            m_canceledCallback  = new UniversalInputManager.TextInputCanceledCallback(this.OnInputCanceled),
            m_font              = this.m_inputText.TrueTypeFont,
            m_alignment         = 4,
            m_maxCharacters     = (this.m_challengeType != ChallengeType.CVV) ? 0 : 4
        };
        UniversalInputManager.Get().UseTextInput(parms, false);
    }
Example #4
0
    private void ShowInput()
    {
        this.m_quantityText.gameObject.SetActive(false);
        Camera camera = CameraUtils.FindFirstByLayer(base.gameObject.layer);
        Bounds bounds = this.m_quantityText.GetBounds();
        Rect   rect   = CameraUtils.CreateGUIViewportRect(camera, bounds.min, bounds.max);

        UniversalInputManager.TextInputParams parms = new UniversalInputManager.TextInputParams {
            m_owner                        = base.gameObject,
            m_number                       = true,
            m_rect                         = rect,
            m_updatedCallback              = new UniversalInputManager.TextInputUpdatedCallback(this.OnInputUpdated),
            m_completedCallback            = new UniversalInputManager.TextInputCompletedCallback(this.OnInputComplete),
            m_canceledCallback             = new UniversalInputManager.TextInputCanceledCallback(this.OnInputCanceled),
            m_font                         = this.m_quantityText.GetLocalizedFont(),
            m_alignment                    = 4,
            m_maxCharacters                = 2,
            m_touchScreenKeyboardHideInput = true
        };
        UniversalInputManager.Get().UseTextInput(parms, false);
    }