コード例 #1
0
ファイル: GraphEditor.cs プロジェクト: kabirules/Kenny
        public void Draw(GraphEditorStyle style)
        {
            if (!dragging || !IsSelectionValid())
            {
                return;
            }

            GUI.backgroundColor = style.selectionBoxColor;
            GUI.Box(bounds, "");
        }
コード例 #2
0
ファイル: GraphEditor.cs プロジェクト: kabirules/Kenny
        /// <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();
        }