public bool OnPointSelected(ConnectionPoint point) { var e = Event.current; symboleManager.OnMouseOverInputPoint(e.mousePosition); switch (e.type) { case EventType.MouseUp: if (symboleManager.selectedInputPoint) { if (point.symbole != symboleManager.selectedInputPoint.symbole && symboleManager.selectedInputPoint.PointPos.Contains(few.InvGraphToScreenSpace(e.mousePosition))) { point.AddConnection(symboleManager.selectedInputPoint); symboleManager.selectedInputPoint.AddConnection(point); if (SymboleManager.selections != null && SymboleManager.selections.Count > 0) { SymboleManager.selections.Clear(); } } } symboleManager.selectedInputPoint = null; symboleManager.selectedOutputPoint = null; break; } if (point.PointPos.Contains(few.InvGraphToScreenSpace(e.mousePosition)) && e.mousePosition.y > 18) { return(true); } return(false); }
private void CreateConnection() { m_inSelectedPoint.AddConnection(m_outSelectionPoint); }