public XmlAssertable(AssertContext assertContext) { _assertContext = assertContext; _attributeCheck = new AttributeCheck(_assertContext); _nameCheck = new NameCheck(_assertContext); _textCheck = new TextCheck(_assertContext); _childrenNumberCheck = new ChildrenNumberCheck(_assertContext); }
public static float GetPropertyHeight(SerProp prop, GUICon cont, bool includeChildren, AttributeCheck ignoreCheck) => GetPropertyHeightMaster(prop, cont, includeChildren, ignoreCheck);
public static float GetPropertyHeight(SerProp prop, GUICon cont, AttributeCheck ignoreCheck) => GetPropertyHeightMaster(prop, cont, true, ignoreCheck);
public static float GetPropertyHeight(SerProp prop, AttributeCheck ignoreCheck) => GetPropertyHeightMaster(prop, new GUICon(prop.displayName), true, ignoreCheck);
public static float GetPropertyHeight(SerProp prop, bool includeChildren, AttributeCheck ignoreCheck) => GetPropertyHeightMaster(prop, new GUICon(prop.displayName), includeChildren, ignoreCheck);
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)); }
public static eProp PropertyField(Rect pos, SerProp prop, GUICon cont, AttributeCheck ignoreCheck, bool autoLabelField = false) => PropFieldMaster(pos, prop, cont, true, ignoreCheck, autoLabelField);
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);
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); }
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)); }