Пример #1
0
 public XmlAssertable(AssertContext assertContext)
 {
     _assertContext       = assertContext;
     _attributeCheck      = new AttributeCheck(_assertContext);
     _nameCheck           = new NameCheck(_assertContext);
     _textCheck           = new TextCheck(_assertContext);
     _childrenNumberCheck = new ChildrenNumberCheck(_assertContext);
 }
Пример #2
0
 public static float GetPropertyHeight(SerProp prop, GUICon cont, bool includeChildren, AttributeCheck ignoreCheck) =>
 GetPropertyHeightMaster(prop, cont, includeChildren, ignoreCheck);
Пример #3
0
 public static float GetPropertyHeight(SerProp prop, GUICon cont, AttributeCheck ignoreCheck) => GetPropertyHeightMaster(prop, cont, true, ignoreCheck);
Пример #4
0
 public static float GetPropertyHeight(SerProp prop, AttributeCheck ignoreCheck) => GetPropertyHeightMaster(prop, new GUICon(prop.displayName), true, ignoreCheck);
Пример #5
0
 public static float GetPropertyHeight(SerProp prop, bool includeChildren, AttributeCheck ignoreCheck) =>
 GetPropertyHeightMaster(prop, new GUICon(prop.displayName), includeChildren, ignoreCheck);
Пример #6
0
        private static float GetPropertyHeightMaster(SerProp prop, GUICon cont, bool includeChildren, AttributeCheck ignoreAttributeCheck)
        {
            if (ignoreAttributeCheck == AttributeCheck.DontCheck)
            {
                return(DoPropSwitchHeight(prop, cont, includeChildren));
            }

            var attributes = prop.GetSerializedPropertyAttributes();

            if (attributes.Length == 0)
            {
                return(DoPropSwitchHeight(prop, cont, includeChildren));
            }

            return(EditorGUI.GetPropertyHeight(prop, cont, includeChildren));
        }
Пример #7
0
 public static eProp PropertyField(Rect pos, SerProp prop, GUICon cont, AttributeCheck ignoreCheck, bool autoLabelField = false) =>
 PropFieldMaster(pos, prop, cont, true, ignoreCheck, autoLabelField);
Пример #8
0
 public static eProp PropertyField(Rect pos, SerProp prop, bool includeChildren, AttributeCheck ignoreCheck, bool autoLabelField = false) =>
 PropFieldMaster(pos, prop, new GUICon(prop.displayName), includeChildren, ignoreCheck, autoLabelField);
Пример #9
0
        private static eProp PropDraw(Rect pos, SerProp prop, GUICon cont, bool includeChildren, AttributeCheck ignoreCheck)
        {
            var data = new eProp {
                Event = new Event(Event.current), Rect = pos, Value = prop
            };

            if (ignoreCheck == AttributeCheck.DontCheck)
            {
                return(DoPropSwitchDraw(pos, prop, cont, includeChildren, data));
            }

            var attributes = prop.GetSerializedPropertyAttributes();

            if (attributes.Length == 0)
            {
                return(DoPropSwitchDraw(pos, prop, cont, includeChildren, data));
            }

            EditorGUI.PropertyField(pos, prop, cont, includeChildren);

            return(data);
        }
Пример #10
0
        private static eProp PropFieldMaster(Rect pos, SerProp prop, GUICon cont, bool includeChildren, AttributeCheck ignoreCheck, bool autoLabelField = false)
        {
            if (!autoLabelField)
            {
                return(PropDraw(pos, prop, cont, includeChildren, ignoreCheck));
            }

            using (Disposables.LabelFieldSetWidth(pos.width * 0.4f))
                return(PropDraw(pos, prop, cont, includeChildren, ignoreCheck));
        }