private static void DrawNodes(UTNodeEditorModel editorModel, NodeDrawingPhase phase) { foreach (UTNode node in editorModel.GetNodes()) { DrawNode(editorModel, node, phase); } }
private static UTNode GetNodeUnderMouse(UTNodeEditorModel editorModel, Vector2 mousePosition) { foreach (var node in editorModel.GetNodes()) { if (node.Bounds.Contains(mousePosition)) { return(node); } } return(null); }
private static Vector2 CalculateRequiredSize(UTNodeEditorModel editorModel) { float width = 0; float height = 0; foreach (UTNode node in editorModel.GetNodes()) { width = Mathf.Max(node.Bounds.xMax, width); height = Mathf.Max(node.Bounds.yMax, height); } return(new Vector2(width, height)); }
private static UTNode.Connector GetConnectorUnderMouse(UTNodeEditorModel editorModel, Vector2 mousePosition) { foreach (var node in editorModel.GetNodes()) { foreach (var connector in node.Connectors) { if (connector.connectorPosition.Contains(mousePosition)) { return(connector); } } } return(null); }
private static UTNode GetNodeUnderMouse(UTNodeEditorModel editorModel, Vector2 mousePosition) { foreach (var node in editorModel.GetNodes()) { if (node.Bounds.Contains (mousePosition)) { return node; } } return null; }
private static UTNode.Connector GetConnectorUnderMouse(UTNodeEditorModel editorModel, Vector2 mousePosition) { foreach (var node in editorModel.GetNodes()) { foreach (var connector in node.Connectors) { if (connector.connectorPosition.Contains (mousePosition)) { return connector; } } } return null; }
private static void DrawNodes(UTNodeEditorModel editorModel, NodeDrawingPhase phase) { foreach (UTNode node in editorModel.GetNodes()) { DrawNode (editorModel, node, phase); } }
private static Vector2 CalculateRequiredSize(UTNodeEditorModel editorModel) { float width = 0; float height = 0; foreach (UTNode node in editorModel.GetNodes()) { width = Mathf.Max (node.Bounds.xMax, width); height = Mathf.Max (node.Bounds.yMax, height); } return new Vector2 (width, height); }