Пример #1
0
        public void Disable()
        {
            if (!IsValidInput)
            {
                return;
            }

            if (OnUnfocus != null)
            {
                OnUnfocus(InputField.text);
                OnUnfocus = null;
            }

            InputField.onEndEdit.RemoveAllListeners();
            InputField.DeactivateInputField();
        }
Пример #2
0
        public void Enable(OnUnFocusDelegate unFocusCallback)
        {
            OnUnfocus = unFocusCallback;

            if (OnFocus != null)
            {
                OnFocus();
            }

            InputField.onEndEdit.AddListener((string s) => Disable());

            InputField.Select();
            InputField.ActivateInputField();

            InputField.onValueChanged.AddListener(ValueChangeCheck);
        }