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

!W GenericMenu改为MenuPopupWindow

This commit is contained in:
Icarus 2019-11-26 17:44:48 +08:00
parent 02f59984a0
commit cfb4d2cb54

View File

@ -280,9 +280,9 @@ namespace XNodeEditor {
} else if (IsHoveringNode && IsHoveringTitle(hoveredNode)) {
if (!Selection.Contains(hoveredNode)) SelectNode(hoveredNode, false);
autoConnectOutput = null;
GenericMenu menu = new GenericMenu();
MenuPopupWindow menu = new MenuPopupWindow();
NodeEditor.GetEditor(hoveredNode, this).AddContextMenuItems(menu);
menu.DropDown(new Rect(Event.current.mousePosition, Vector2.zero));
PopupWindow.Show(new Rect(Event.current.mousePosition, Vector2.zero),menu);
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;