mirror of
https://github.com/Siccity/xNode.git
synced 2026-02-08 08:14:54 +08:00
Added convenience NodeEditorGUILayout.PortPair
This commit is contained in:
parent
c202829c9d
commit
a0d86c895e
@ -143,6 +143,14 @@ namespace XNodeEditor {
|
|||||||
else NodeEditor.portPositions.Add(port, portPos);
|
else NodeEditor.portPositions.Add(port, portPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary> Draws an input and an output port on the same line </summary>
|
||||||
|
public static void PortPair(XNode.NodePort input, XNode.NodePort output) {
|
||||||
|
GUILayout.BeginHorizontal();
|
||||||
|
NodeEditorGUILayout.PortField(input, GUILayout.MinWidth(0));
|
||||||
|
NodeEditorGUILayout.PortField(output, GUILayout.MinWidth(0));
|
||||||
|
GUILayout.EndHorizontal();
|
||||||
|
}
|
||||||
|
|
||||||
public static void DrawPortHandle(Rect rect, Color backgroundColor, Color typeColor) {
|
public static void DrawPortHandle(Rect rect, Color backgroundColor, Color typeColor) {
|
||||||
Color col = GUI.color;
|
Color col = GUI.color;
|
||||||
GUI.color = backgroundColor;
|
GUI.color = backgroundColor;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user