コード例 #1
0
        void InputListener_MouseDown(EditorMouseEvent mouseEvent)
        {
            _editorView.GraphView.GetNodeViewUnderMouse((view) =>
            {
                if (_editorView.GraphView.WindowSize.Contains(mouseEvent.Position))
                {
                    var node = view != null ? view.Node : null;
                    SelectNode.InvokeSafe(node);
                }
            });

            _editorView.GraphView.GetPinViewUnderMouse((view) => MouseDownOverPin.InvokeSafe(view.Pin));
        }
コード例 #2
0
        void InputListener_MouseUp(EditorMouseEvent mouseEvent)
        {
            _editorView.GraphView.GetPinViewUnderMouse((view) =>
            {
                NodeEditor.Logger.Log <NodeEditorUserEventsListener>("Mouse released over Pin {0}. (Node ID: {1}) (Button: {2})",
                                                                     view.Pin.Name,
                                                                     view.Pin.Node.ID,
                                                                     mouseEvent.Button);

                if (mouseEvent.IsLeftMouse)
                {
                    MouseUpOverPin.InvokeSafe(view.Pin);
                }
            });

            MouseUp.InvokeSafe();
        }