예제 #1
0
 public void Show()
 {
     CqaLabel.FormLabel(_label);
     CqaLabel.FormDescription(_description);
     _selectedValue = EditorGUILayout.Popup(_selectedValue, _possibleValues);
     CqaLabel.FormGroupSpacing();
 }
예제 #2
0
        public void Show()
        {
            CqaLabel.FormLabel(_label);
            CqaLabel.FormDescription(_description);
            string newValue = GUILayout.TextField(_value);

            if (newValue != Value)
            {
                Touched = true;
            }

            _value = newValue;

            if (Touched && newValue.Length == 0)
            {
                CqaLabel.FormError("This field can not be empty.");
            }
            else if (!HasInitialValue() && newValue != _initialValue && _providePotentialClashes().Contains(Value))
            {
                CqaLabel.FormError("This name is already taken.");
            }

            CqaLabel.FormGroupSpacing();
        }
예제 #3
0
        public void Show()
        {
            CqaLabel.FormLabel(_label);
            CqaLabel.FormDescription(_description);

            _scroll = EditorGUILayout.BeginScrollView(_scroll);
            string newValue = GUILayout.TextArea(_value);

            EditorGUILayout.EndScrollView();

            if (newValue != Value)
            {
                Touched = true;
            }

            _value = newValue;

            if (Touched && newValue.Length == 0)
            {
                CqaLabel.FormError("This field can not be empty.");
            }

            CqaLabel.FormGroupSpacing();
        }