1
0
mirror of https://github.com/Siccity/xNode.git synced 2026-03-26 22:49:02 +08:00

!O 调整了GroupName 绘制得顺序,如果连接数只有一个不显示索引,索引数+1

This commit is contained in:
Icarus 2019-09-27 16:36:11 +08:00
parent 46d093339c
commit 2248e0fa9f
2 changed files with 3 additions and 3 deletions

View File

@ -24,11 +24,11 @@ namespace XNodeEditor {
Controls(); Controls();
DrawGrid(position, zoom, panOffset); DrawGrid(position, zoom, panOffset);
_drawGroupName();
DrawDraggedConnection(); DrawDraggedConnection();
DrawConnections(); DrawConnections();
DrawNodes(); DrawNodes();
DrawSelectionBox(); DrawSelectionBox();
_drawGroupName();
DrawTooltip(); DrawTooltip();
graphEditor.OnGUI(); graphEditor.OnGUI();

View File

@ -201,7 +201,7 @@ namespace XNodeEditor {
//当选择节点时显示所有的输入点索引 //当选择节点时显示所有的输入点索引
if (port.direction == XNode.NodePort.IO.Output) if (port.direction == XNode.NodePort.IO.Output)
{ {
if (port.Connection != null) if (port.Connection != null && port.Connection.ConnectionCount > 1)
{ {
if (port.Connection.node == Selection.activeObject) if (port.Connection.node == Selection.activeObject)
{ {
@ -214,7 +214,7 @@ namespace XNodeEditor {
GUI.contentColor = textCol; GUI.contentColor = textCol;
{ {
EditorGUI.LabelField(new Rect( rect.position + new Vector2(rect.size.x / 4 - 0.5f,0), rect.size), EditorGUI.LabelField(new Rect( rect.position + new Vector2(rect.size.x / 4 - 0.5f,0), rect.size),
index.ToString()); (index + 1).ToString());
} }
GUI.contentColor = dCol; GUI.contentColor = dCol;
EditorStyles.label.fontStyle = fontStyle; EditorStyles.label.fontStyle = fontStyle;