From 3c39a9582e15ccb3869e1d63a7b97c798f8f36f2 Mon Sep 17 00:00:00 2001 From: Woland Date: Tue, 9 Apr 2019 19:28:08 +0200 Subject: [PATCH] NodeEditorGUILayout: Use OutputPort style for ShowBackingValue.Always --- Scripts/Editor/NodeEditorGUILayout.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Scripts/Editor/NodeEditorGUILayout.cs b/Scripts/Editor/NodeEditorGUILayout.cs index b52731a..c8cc9f7 100644 --- a/Scripts/Editor/NodeEditorGUILayout.cs +++ b/Scripts/Editor/NodeEditorGUILayout.cs @@ -117,18 +117,15 @@ namespace XNodeEditor { } switch (showBacking) { case XNode.Node.ShowBackingValue.Unconnected: - // Display a label if port is connected - if (port.IsConnected) 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)); + DrawStyledPropertyField(property, label, NodeEditorResources.OutputPort, showBacking: !port.IsConnected, includeChildren); break; case XNode.Node.ShowBackingValue.Never: // Display a label EditorGUILayout.LabelField(label != null ? label : new GUIContent(property.displayName), NodeEditorResources.OutputPort, GUILayout.MinWidth(30)); break; case XNode.Node.ShowBackingValue.Always: + DrawStyledPropertyField(property, label, NodeEditorResources.OutputPort, showBacking: true, includeChildren); // Display an editable property field - EditorGUILayout.PropertyField(property, label, includeChildren, GUILayout.MinWidth(30)); break; }