mirror of
https://github.com/Siccity/xNode.git
synced 2026-03-26 22:49:02 +08:00
!W(Node Editor GUI Layout) LabelAttribute logic
This commit is contained in:
parent
ecb863630c
commit
32e375e3da
@ -40,6 +40,21 @@ namespace XNodeEditor {
|
||||
// If property is not a port, display a regular property field
|
||||
if (port == null) EditorGUILayout.PropertyField(property, label, includeChildren, GUILayout.MinWidth(30));
|
||||
else {
|
||||
|
||||
Node.LabelAttribute labelAttribute;
|
||||
|
||||
if (NodeEditorUtilities.GetCachedAttrib(port.node.GetType(), property.name, out labelAttribute))
|
||||
{
|
||||
if (label != null)
|
||||
{
|
||||
label.text = labelAttribute.Label;
|
||||
}
|
||||
else
|
||||
{
|
||||
label = new GUIContent(labelAttribute.Label);
|
||||
}
|
||||
}
|
||||
|
||||
Rect rect = new Rect();
|
||||
|
||||
float spacePadding = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user