mirror of
https://github.com/Siccity/xNode.git
synced 2026-03-26 22:49:02 +08:00
!W 动态Port新增了一个删除
This commit is contained in:
parent
38df17b58b
commit
0602d3fccf
@ -112,6 +112,10 @@ namespace XNodeEditor {
|
|||||||
void ShowPortContextMenu(XNode.NodePort hoveredPort) {
|
void ShowPortContextMenu(XNode.NodePort hoveredPort) {
|
||||||
GenericMenu contextMenu = new GenericMenu();
|
GenericMenu contextMenu = new GenericMenu();
|
||||||
contextMenu.AddItem(new GUIContent("Clear Connections"), false, () => hoveredPort.ClearConnections());
|
contextMenu.AddItem(new GUIContent("Clear Connections"), false, () => hoveredPort.ClearConnections());
|
||||||
|
if (hoveredPort.IsDynamic)
|
||||||
|
{
|
||||||
|
contextMenu.AddItem(new GUIContent("Remove"), false, () => hoveredPort.node.RemoveDynamicPort(hoveredPort));
|
||||||
|
}
|
||||||
contextMenu.DropDown(new Rect(Event.current.mousePosition, Vector2.zero));
|
contextMenu.DropDown(new Rect(Event.current.mousePosition, Vector2.zero));
|
||||||
if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets();
|
if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user