public void DrawConnectionOutputPointMark(NodeEvent eventSource, bool justConnecting, Event current)
{
if (scaleFactor != SCALE_MAX) return;
var defaultPointTex = NodeGUIUtility.outputPointMarkConnectedTex;
bool shouldDrawEnable =
!( eventSource != null && eventSource.eventSourceNode != null &&
!ConnectionData.CanConnect(m_data, eventSource.eventSourceNode.Data)
);
if (shouldDrawEnable && justConnecting && eventSource != null) {
if (eventSource.eventSourceNode.Id != this.Id) {
var connectionPoint = eventSource.point;
if (connectionPoint.IsInput) {
defaultPointTex = NodeGUIUtility.enablePointMarkTex;
}
}
}
var globalMousePosition = current.mousePosition;
foreach (var point in m_data.OutputPoints) {
var pointRegion = point.GetGlobalPointRegion(this);
GUI.DrawTexture(
pointRegion,
defaultPointTex
);
// eventPosition is contained by outputPointRect.
if (pointRegion.Contains(globalMousePosition)) {
if (current.type == EventType.MouseDown) {
NodeGUIUtility.NodeEventHandler(
new NodeEvent(NodeEvent.EventType.EVENT_NODE_CONNECT_STARTED, this, current.mousePosition, point));
}
}
}
}