4 magladore!
This commit is contained in:
parent
8d629e5cd3
commit
b1e0767d91
@ -27,8 +27,11 @@ namespace ImageProcessingGraph.Editor.Unity_Image_Processing.Scripts.Editor.Wind
|
|||||||
{
|
{
|
||||||
window.searchProvider.target = (VisualElement)window.focusController.focusedElement;
|
window.searchProvider.target = (VisualElement)window.focusController.focusedElement;
|
||||||
|
|
||||||
// ⚡ Override the search window open with a customized search tree
|
var mousePos =
|
||||||
SearchWindow.Open(new SearchWindowContext(position), new ImageProcessingGraphSearchProvider.CustomSearchProviderForEdge(window.searchProvider, edge, (IPTPort)edge.input, (IPTPort)edge.output));
|
window.ChangeCoordinatesTo(window, window.cachedMousePos - window.Window.position.position);
|
||||||
|
var graphMousePosition = window.contentViewContainer.WorldToLocal(mousePos);
|
||||||
|
|
||||||
|
SearchWindow.Open(new SearchWindowContext(GUIUtility.GUIToScreenPoint(Event.current.mousePosition)), new ImageProcessingGraphSearchProvider.CustomSearchProviderForEdge(window.searchProvider, edge, (IPTPort)edge.input, (IPTPort)edge.output));
|
||||||
|
|
||||||
// Remove connections as you did
|
// Remove connections as you did
|
||||||
List<GraphConnection> connections = new List<GraphConnection>();
|
List<GraphConnection> connections = new List<GraphConnection>();
|
||||||
|
@ -27,6 +27,8 @@ namespace ImageProcessingGraph.Editor
|
|||||||
internal ImageProcessingGraphEdgeConnectorListener edgeConnectorListener;
|
internal ImageProcessingGraphEdgeConnectorListener edgeConnectorListener;
|
||||||
|
|
||||||
private bool isDropdownEnabled = false;
|
private bool isDropdownEnabled = false;
|
||||||
|
public Vector2 cachedMousePos;
|
||||||
|
|
||||||
|
|
||||||
private Button debugModeButton;
|
private Button debugModeButton;
|
||||||
private Button outputRunOrder;
|
private Button outputRunOrder;
|
||||||
@ -76,8 +78,15 @@ namespace ImageProcessingGraph.Editor
|
|||||||
graphViewChanged += OnGraphViewChanged;
|
graphViewChanged += OnGraphViewChanged;
|
||||||
|
|
||||||
Undo.undoRedoPerformed += UndoRedoPerformed;
|
Undo.undoRedoPerformed += UndoRedoPerformed;
|
||||||
|
RegisterCallback<MouseMoveEvent>(OnMouseMove);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnMouseMove(MouseMoveEvent evt)
|
||||||
|
{
|
||||||
|
cachedMousePos = evt.localMousePosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void UndoRedoPerformed()
|
private void UndoRedoPerformed()
|
||||||
{
|
{
|
||||||
DrawNodes();
|
DrawNodes();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user