Exemplo n.º 1
0
        public override void OnGUI()
        {
            if (View == null)
            {
                View = new BehaviourEditorView();
            }

            if (nodePadding == null)
            {
                nodePadding = new GUIStyle()
                {
                    padding = new RectOffset()
                    {
                        left  = 4,
                        right = 4
                    }
                };
            }

            currentEvent = Event.current;

            DrawBackground(Position, View.PanPosition);

            GUI.BeginClip(Position);
            DrawNodes();
            DrawConnections();
            GUI.EndClip();

            HandleInput();
        }
Exemplo n.º 2
0
        public override void OnGUI()
        {
            if (View == null)
            {
                View = new BehaviourEditorView();
            }

            ScreenRect = new Rect(0, EditorGUIUtility.singleLineHeight + 1,
                                  Position.width, Position.height - (EditorGUIUtility.singleLineHeight + 1));

            CurrentEvent = Event.current;

            DrawBackground(ScreenRect, View.PanPosition);
            DrawTopBar();

            DrawNodes();
            DrawConnections();
            HandleInput();
        }