mirror of
https://github.com/Siccity/xNode.git
synced 2026-03-26 22:49:02 +08:00
NodeEditorGUILayout: Use OutputPort style for ShowBackingValue.Always
This commit is contained in:
parent
b9606ac680
commit
3c39a9582e
@ -117,18 +117,15 @@ namespace XNodeEditor {
|
|||||||
}
|
}
|
||||||
switch (showBacking) {
|
switch (showBacking) {
|
||||||
case XNode.Node.ShowBackingValue.Unconnected:
|
case XNode.Node.ShowBackingValue.Unconnected:
|
||||||
// Display a label if port is connected
|
DrawStyledPropertyField(property, label, NodeEditorResources.OutputPort, showBacking: !port.IsConnected, includeChildren);
|
||||||
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));
|
|
||||||
break;
|
break;
|
||||||
case XNode.Node.ShowBackingValue.Never:
|
case XNode.Node.ShowBackingValue.Never:
|
||||||
// Display a label
|
// Display a label
|
||||||
EditorGUILayout.LabelField(label != null ? label : new GUIContent(property.displayName), NodeEditorResources.OutputPort, GUILayout.MinWidth(30));
|
EditorGUILayout.LabelField(label != null ? label : new GUIContent(property.displayName), NodeEditorResources.OutputPort, GUILayout.MinWidth(30));
|
||||||
break;
|
break;
|
||||||
case XNode.Node.ShowBackingValue.Always:
|
case XNode.Node.ShowBackingValue.Always:
|
||||||
|
DrawStyledPropertyField(property, label, NodeEditorResources.OutputPort, showBacking: true, includeChildren);
|
||||||
// Display an editable property field
|
// Display an editable property field
|
||||||
EditorGUILayout.PropertyField(property, label, includeChildren, GUILayout.MinWidth(30));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user