mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-20 17:26:02 +08:00
UI changes
Brighter nodes, fatter wires, padding, prettier enum fields
This commit is contained in:
parent
efa1dc9ad5
commit
f6d92589dd
@ -114,7 +114,11 @@ public class NodeEditor {
|
|||||||
fieldValue = EditorGUILayout.Toggle(fieldPrettyName, (bool)fieldValue);
|
fieldValue = EditorGUILayout.Toggle(fieldPrettyName, (bool)fieldValue);
|
||||||
}
|
}
|
||||||
else if (fieldType.IsEnum) {
|
else if (fieldType.IsEnum) {
|
||||||
fieldValue = EditorGUILayout.EnumPopup(fieldPrettyName, (Enum)fieldValue);
|
Rect rect = EditorGUILayout.GetControlRect();
|
||||||
|
rect.width *= 0.5f;
|
||||||
|
EditorGUI.LabelField(rect, fieldPrettyName);
|
||||||
|
rect.x += rect.width;
|
||||||
|
fieldValue = EditorGUI.EnumPopup(rect, (Enum)fieldValue);
|
||||||
}
|
}
|
||||||
else if (fieldType == typeof(string)) {
|
else if (fieldType == typeof(string)) {
|
||||||
|
|
||||||
|
|||||||
@ -114,7 +114,7 @@ public partial class NodeEditorWindow {
|
|||||||
Color prevCol = GUI.color;
|
Color prevCol = GUI.color;
|
||||||
Color edgeCol = new Color(0.1f, 0.1f, 0.1f, col.a);
|
Color edgeCol = new Color(0.1f, 0.1f, 0.1f, col.a);
|
||||||
Handles.DrawBezier(startPoint, endPoint, startTangent, endTangent, edgeCol, null, 4);
|
Handles.DrawBezier(startPoint, endPoint, startTangent, endTangent, edgeCol, null, 4);
|
||||||
Handles.DrawBezier(startPoint, endPoint, startTangent, endTangent, col, null, 2);
|
Handles.DrawBezier(startPoint, endPoint, startTangent, endTangent, col, null, 4);
|
||||||
GUI.color = prevCol;
|
GUI.color = prevCol;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -48,6 +48,7 @@ public static class NodeEditorResources {
|
|||||||
nodeBody = new GUIStyle();
|
nodeBody = new GUIStyle();
|
||||||
nodeBody.normal.background = NodeEditorResources.nodeBody;
|
nodeBody.normal.background = NodeEditorResources.nodeBody;
|
||||||
nodeBody.border = new RectOffset(32, 32, 32, 32);
|
nodeBody.border = new RectOffset(32, 32, 32, 32);
|
||||||
|
nodeBody.padding = new RectOffset(10, 10, 2, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user