1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-20 09:16:01 +08:00

Merge pull request #70 from nostek/improvement/instanceportlistlabel

Added label before drawing InstancePortList
This commit is contained in:
Thor Brigsted 2018-09-22 11:33:21 +02:00 committed by GitHub
commit 88d23a07f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,6 +50,7 @@ namespace XNodeEditor {
if (instancePortList) {
Type type = GetType(property);
XNode.Node.ConnectionType connectionType = inputAttribute != null ? inputAttribute.connectionType : XNode.Node.ConnectionType.Multiple;
EditorGUILayout.LabelField(label != null ? label : new GUIContent(property.displayName));
InstancePortList(property.name, type, property.serializedObject, port.direction, connectionType);
return;
}
@ -86,6 +87,7 @@ namespace XNodeEditor {
if (instancePortList) {
Type type = GetType(property);
XNode.Node.ConnectionType connectionType = outputAttribute != null ? outputAttribute.connectionType : XNode.Node.ConnectionType.Multiple;
EditorGUILayout.LabelField(label != null ? label : new GUIContent(property.displayName));
InstancePortList(property.name, type, property.serializedObject, port.direction, connectionType);
return;
}