bool ShowTouchScreenKeyboard(GUIBase_Button inInput, E_KeyBoardMode inMode, KeyboardClose inCloseDelegate, string inText, string inPlaceholder, int inMaxTextLength) { if (m_ActiveInput != null || inInput == null || inCloseDelegate == null) { return(false); } /// setup arguments for Touch keyboard... TouchScreenKeyboardType keyboardType = inMode == E_KeyBoardMode.Email ? TouchScreenKeyboardType.EmailAddress : inMode == E_KeyBoardMode.Password ? TouchScreenKeyboardType.Default : TouchScreenKeyboardType.ASCIICapable; bool autocorrection = false; //inMode != E_KeyBoardMode.Password; bool secure = inMode == E_KeyBoardMode.Password; // open keyboard... TouchScreenKeyboard keyboard = TouchScreenKeyboard.Open(inText, keyboardType, autocorrection, false, secure, false, inPlaceholder); if (keyboard == null) { return(false); } m_ActiveInput = inInput; StartCoroutine(ProcessKeyboardInput(keyboard, inCloseDelegate, inText, inMaxTextLength)); return(true); }
public bool ShowKeyboard(GUIBase_Button inInput, E_KeyBoardMode inMode, KeyboardClose inCloseDelegate, string inText, int inMaxTextLength = -1) { return(ShowKeyboard(inInput, inMode, inCloseDelegate, inText, string.Empty, inMaxTextLength)); }
public bool ShowKeyboard(GUIBase_Button inInput, E_KeyBoardMode inMode, KeyboardClose inCloseDelegate, string inText, string inPlaceholder, int inMaxTextLength = -1) { #if UNITY_EDITOR m_ActiveInput = null; Debug.LogError("ShowKeyboard not implemented !!!"); return(false); #elif UNITY_IPHONE || UNITY_ANDROID return(ShowTouchScreenKeyboard(inInput, inMode, inCloseDelegate, inText, inPlaceholder, inMaxTextLength)); #else Debug.LogError("ShowKeyboard not implemented !!!"); return(false); #endif }