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

!TX(Code format)

This commit is contained in:
Icarus 2019-12-23 23:30:04 +08:00
parent 5d2259608e
commit 6ecef29f07
2 changed files with 6 additions and 6 deletions

View File

@ -226,8 +226,8 @@ namespace XNodeEditor {
} }
// Open context menu for auto-connection // Open context menu for auto-connection
else if (NodeEditorPreferences.GetSettings().dragToCreate && autoConnectOutput != null) { else if (NodeEditorPreferences.GetSettings().dragToCreate && autoConnectOutput != null) {
menuPopupWindow.OnCloseA = ReleaseDraggedConnection; menuPopupWindow.onCloseAction = ReleaseDraggedConnection;
menuPopupWindow.OpenBeforeMousePos = e.mousePosition; menuPopupWindow.openBeforeMousePos = e.mousePosition;
PopupWindow.Show(new Rect(Event.current.mousePosition, Vector2.zero),menuPopupWindow); PopupWindow.Show(new Rect(Event.current.mousePosition, Vector2.zero),menuPopupWindow);
} }
@ -286,7 +286,7 @@ namespace XNodeEditor {
e.Use(); // Fixes copy/paste context menu appearing in Unity 5.6.6f2 - doesn't occur in 2018.3.2f1 Probably needs to be used in other places. e.Use(); // Fixes copy/paste context menu appearing in Unity 5.6.6f2 - doesn't occur in 2018.3.2f1 Probably needs to be used in other places.
} else if (!IsHoveringNode) { } else if (!IsHoveringNode) {
autoConnectOutput = null; autoConnectOutput = null;
menuPopupWindow.OpenBeforeMousePos = e.mousePosition; menuPopupWindow.openBeforeMousePos = e.mousePosition;
PopupWindow.Show(new Rect(Event.current.mousePosition, Vector2.zero),menuPopupWindow); PopupWindow.Show(new Rect(Event.current.mousePosition, Vector2.zero),menuPopupWindow);
} }
} }

View File

@ -50,7 +50,7 @@ namespace XNodeEditor {
if (string.IsNullOrEmpty(path)) continue; if (string.IsNullOrEmpty(path)) continue;
menu.AddItem(path, () => { menu.AddItem(path, () => {
pos = NodeEditorWindow.current.WindowToGridPosition(menu.OpenBeforeMousePos); pos = NodeEditorWindow.current.WindowToGridPosition(menu.openBeforeMousePos);
XNode.Node node = CreateNode(type, pos); XNode.Node node = CreateNode(type, pos);
NodeEditorWindow.current.AutoConnect(node); NodeEditorWindow.current.AutoConnect(node);
}); });
@ -58,7 +58,7 @@ namespace XNodeEditor {
if (NodeEditorWindow.copyBuffer != null && NodeEditorWindow.copyBuffer.Length > 0) if (NodeEditorWindow.copyBuffer != null && NodeEditorWindow.copyBuffer.Length > 0)
menu.AddItem("Paste", () => menu.AddItem("Paste", () =>
{ {
pos = NodeEditorWindow.current.WindowToGridPosition(menu.OpenBeforeMousePos); pos = NodeEditorWindow.current.WindowToGridPosition(menu.openBeforeMousePos);
NodeEditorWindow.current.PasteNodes(pos); NodeEditorWindow.current.PasteNodes(pos);
}); });
@ -71,7 +71,7 @@ namespace XNodeEditor {
return; return;
} }
pos = NodeEditorWindow.current.WindowToGridPosition(menu.OpenBeforeMousePos); pos = NodeEditorWindow.current.WindowToGridPosition(menu.openBeforeMousePos);
for (int i = 0; i < NodeEditorReflection.nodeTypes.Length; i++) for (int i = 0; i < NodeEditorReflection.nodeTypes.Length; i++)
{ {