Exemple #1
0
 public virtual void OnEndEdit(string s)
 {
     if (m_InputField != null)
     {
         m_InputField.onEndEdit.RemoveListener(OnEndEdit);
         //
         gameObject.SetActive(false);
         m_InputField.OnDeselect(null);
         m_InputField = null;
     }
 }
Exemple #2
0
 public static UIKeyboard GetInstanceAt(UIInputField inputField, Transform parent, InputField.ContentType contentType)
 {
     if (s_Instance != null)
     {
         if (parent == null)
         {
             parent = s_Instance.m_DefaultParent;
         }
         Transform t = s_Instance.transform;
         t.SetParent(parent, false);
         t.localPosition = Vector3.zero;
         t.localRotation = Quaternion.identity;
         s_Instance.gameObject.SetActive(true);
         //
         s_Instance.m_InputField = inputField;
         s_Instance.SetPage(0);
         inputField.onEndEdit.AddListener(s_Instance.OnEndEdit);
         return(s_Instance);
     }
     return(null);
 }