private bool DrawOneElement(ref Rect inputRect, PropertyWrapper wrapper, int index) { Rect currentRect = RectExtention.CutRectVertical(ref inputRect, wrapper.GetElementHeight(index)); Rect buttonRect = RectExtention.CutRectHorizontal(ref currentRect, TotalLineSpacing); buttonRect.width = buttonRect.height = EditorGUIUtility.singleLineHeight; if (GUI.Button(buttonRect, "-")) { wrapper.DeletePairAtIndex(index); return(false); } else { EditorGUI.BeginDisabledGroup(true); { EditorGUI.PropertyField(RectExtention.CutRectHorizontalRelative(ref currentRect, 0.3f), wrapper.GetKeyAtIndex(index), GUIContent.none, true); } EditorGUI.EndDisabledGroup(); EditorGUI.indentLevel++; { EditorGUI.PropertyField(currentRect, wrapper.GetValueAtIndex(index), GUIContent.none, true); } EditorGUI.indentLevel--; return(true); } }