public static eInt DrawDisabledPropertyWithMenu(bool disabled, Rect position, SerProp property, GUICon label, GUICon[] Options, int active, bool autoLabelField = false) { Action <Rect> draw = rect => { using (Disposables.SetIndent(0)) PropertyField(rect.Edit(RectEdit.ChangeY(-1), RectEdit.SetHeight(SingleLine)), property, GUICon.none, property.hasVisibleChildren, autoLabelField); }; return(DrawActionWithMenu(disabled, position, draw, label, Options, active)); }
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { using (var propScope = Disposables.PropertyScope(position, label, property)) { label = propScope.content; var useGlobalSpaceProp = property.FindPropertyRelative("useGlobalSpace"); var positionsProp = property.FindPropertyRelative("Positions"); var useGlobalBoolRect = position.Edit(RectEdit.SetHeight(SingleLine)); position = position.Edit(RectEdit.ChangeY(SingleLine)); EditorGUI.PropertyField(useGlobalBoolRect, useGlobalSpaceProp); var targ = property.GetTargetObjectOfProperty <ITDCurve>(); if (targ.IsFixedLength) { if (positionsProp.arraySize != targ.Length) { positionsProp.arraySize = targ.Length; } } ListNullCheck(property); list.HandleDrawing(position.Edit(RectEdit.ChangeX(16))); } }