From 1fece9c7c52ceb087af6ec5b5865dd19fba4a21e Mon Sep 17 00:00:00 2001 From: Icarus <1375400884@qq.com> Date: Thu, 28 Nov 2019 03:45:36 +0800 Subject: [PATCH] =?UTF-8?q?!T(Node=20Editor=20Window=20=20Action)=20?= =?UTF-8?q?=E5=8F=B3=E9=94=AENode=E6=81=A2=E5=A4=8D=E4=B8=BA`GenericMenu`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Scripts/Editor/NodeEditorAction.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Scripts/Editor/NodeEditorAction.cs b/Scripts/Editor/NodeEditorAction.cs index c66287a..c919c9b 100644 --- a/Scripts/Editor/NodeEditorAction.cs +++ b/Scripts/Editor/NodeEditorAction.cs @@ -276,9 +276,9 @@ namespace XNodeEditor { } else if (IsHoveringNode && IsHoveringTitle(hoveredNode)) { if (!Selection.Contains(hoveredNode)) SelectNode(hoveredNode, false); autoConnectOutput = null; - MenuPopupWindow menu = new MenuPopupWindow(); + GenericMenu menu = new GenericMenu(); NodeEditor.GetEditor(hoveredNode, this).AddContextMenuItems(menu); - PopupWindow.Show(new Rect(Event.current.mousePosition, Vector2.zero),menu); + menu.DropDown(new Rect(Event.current.mousePosition, Vector2.zero)); 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) { autoConnectOutput = null;