static private GetToggleRect ( bool hasLabel ) : |
||
hasLabel | bool | |
Результат |
public bool OnGUILayout(SerializedProperty property, GUIContent label, bool includeChildren, params GUILayoutOption[] options) { Rect rect; if (property.propertyType == SerializedPropertyType.Boolean && this.propertyDrawer == null && (this.m_DecoratorDrawers == null || this.m_DecoratorDrawers.Count == 0)) { rect = EditorGUILayout.GetToggleRect(true, options); } else { rect = EditorGUILayout.GetControlRect(EditorGUI.LabelHasContent(label), this.GetHeight(property, label, includeChildren), options); } EditorGUILayout.s_LastRect = rect; return this.OnGUI(rect, property, label, includeChildren); }
public bool OnGUILayout(SerializedProperty property, GUIContent label, bool includeChildren, params GUILayoutOption[] options) { Rect position = property.propertyType != SerializedPropertyType.Boolean || this.propertyDrawer != null || this.m_DecoratorDrawers != null && this.m_DecoratorDrawers.Count != 0 ? EditorGUILayout.GetControlRect(EditorGUI.LabelHasContent(label), this.GetHeight(property, label, includeChildren), options) : EditorGUILayout.GetToggleRect(true, options); EditorGUILayout.s_LastRect = position; return(this.OnGUI(position, property, label, includeChildren)); }