mirror of
https://github.com/Siccity/xNode.git
synced 2026-03-26 22:49:02 +08:00
Exchanged EditorGUILayout.Space() to GUILayout.Space() that takes a parameter height, for custom space distances.
This commit is contained in:
parent
f3090111be
commit
6fd74ff3f1
@ -59,7 +59,7 @@ namespace XNodeEditor {
|
||||
}
|
||||
|
||||
if (instancePortList) {
|
||||
if (spacePadding > 0) EditorGUILayout.Space();
|
||||
if (spacePadding > 0) GUILayout.Space(spacePadding);
|
||||
Type type = GetType(property);
|
||||
XNode.Node.ConnectionType connectionType = inputAttribute != null ? inputAttribute.connectionType : XNode.Node.ConnectionType.Multiple;
|
||||
InstancePortList(property.name, type, property.serializedObject, port.direction, connectionType);
|
||||
@ -69,13 +69,13 @@ namespace XNodeEditor {
|
||||
case XNode.Node.ShowBackingValue.Unconnected:
|
||||
// Display a label if port is connected
|
||||
if (port.IsConnected) {
|
||||
if (spacePadding > 0) { EditorGUILayout.Space(); spacePadding = 0; }
|
||||
if (spacePadding > 0) { GUILayout.Space(spacePadding); spacePadding = 0; }
|
||||
EditorGUILayout.LabelField(label != null ? label : new GUIContent(property.displayName));
|
||||
// Display an editable property field if port is not connected
|
||||
} else EditorGUILayout.PropertyField(property, label, includeChildren, GUILayout.MinWidth(30));
|
||||
break;
|
||||
case XNode.Node.ShowBackingValue.Never:
|
||||
if (spacePadding > 0) { EditorGUILayout.Space(); spacePadding = 0; }
|
||||
if (spacePadding > 0) { GUILayout.Space(spacePadding); spacePadding = 0; }
|
||||
// Display a label
|
||||
EditorGUILayout.LabelField(label != null ? label : new GUIContent(property.displayName));
|
||||
break;
|
||||
@ -99,7 +99,7 @@ namespace XNodeEditor {
|
||||
}
|
||||
|
||||
if (instancePortList) {
|
||||
if (spacePadding > 0) EditorGUILayout.Space();
|
||||
if (spacePadding > 0) GUILayout.Space(spacePadding);
|
||||
Type type = GetType(property);
|
||||
XNode.Node.ConnectionType connectionType = outputAttribute != null ? outputAttribute.connectionType : XNode.Node.ConnectionType.Multiple;
|
||||
InstancePortList(property.name, type, property.serializedObject, port.direction, connectionType);
|
||||
@ -109,13 +109,13 @@ namespace XNodeEditor {
|
||||
case XNode.Node.ShowBackingValue.Unconnected:
|
||||
// Display a label if port is connected
|
||||
if (port.IsConnected) {
|
||||
if (spacePadding > 0) { EditorGUILayout.Space(); spacePadding = 0; }
|
||||
if (spacePadding > 0) { GUILayout.Space(spacePadding); spacePadding = 0; }
|
||||
EditorGUILayout.LabelField(label != null ? label : new GUIContent(property.displayName), NodeEditorResources.OutputPort, GUILayout.MinWidth(30));
|
||||
// Display an editable property field if port is not connected
|
||||
} else EditorGUILayout.PropertyField(property, label, includeChildren, GUILayout.MinWidth(30));
|
||||
break;
|
||||
case XNode.Node.ShowBackingValue.Never:
|
||||
if (spacePadding > 0) { EditorGUILayout.Space(); spacePadding = 0; }
|
||||
if (spacePadding > 0) { GUILayout.Space(spacePadding); spacePadding = 0; }
|
||||
// Display a label
|
||||
EditorGUILayout.LabelField(label != null ? label : new GUIContent(property.displayName), NodeEditorResources.OutputPort, GUILayout.MinWidth(30));
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user