public void Draw(GraphEditorStyle style) { if (!dragging || !IsSelectionValid()) { return; } GUI.backgroundColor = style.selectionBoxColor; GUI.Box(bounds, ""); }
/// <summary> /// Initializes the graph editor with the specified graph /// </summary> /// <param name="graph">The owning graph</param> /// <param name="editorBounds">The bounds of the editor window</param> public virtual void Init(Graph graph, Rect editorBounds) { events = new GraphEditorEvents(); SetGraph(graph); // Reset the camera camera = new GraphCamera(); FocusCameraOnBestFit(editorBounds); editorStyle = CreateEditorStyle(); }