Пример #1
0
    private void OnGUI()
    {
        if (propertyView == null || workView == null)
        {
            CreateViews();
            return;
        }
        //Get event and Process it
        Event e = Event.current;

        ProcessEvents(e);
        //UpdateView
        workView.UpdateView(e, position, new Rect(0f, 0f, viewPercentage, 1f), currentGraph);
        propertyView.UpdateView(e, new Rect(position.width, position.y, position.width, position.height), new Rect(viewPercentage, 0f, 1 - viewPercentage, 1f), currentGraph);
        Repaint();
    }
    void OnGUI()
    {
        if (propertyView == null || workView == null)
        {
            CreateViews();
            return;
        }


        // Get and process the current event
        Event e = Event.current;

        ProcessEvents(e);
//		currentGraph = new NodeGraph ();

        EditorGUILayout.LabelField("this is our node editor");
        workView.UpdateView(position, new Rect(0f, 0f, viewPercentage, 1f), e, currentGraph);
        propertyView.UpdateView(new Rect(position.width, position.y, position.width, position.height), new Rect(viewPercentage, 0f, 1 - viewPercentage, 1f), e, currentGraph);
        Repaint();
    }
Пример #3
0
    void OnGUI()
    {
        //Check for null views
        if (propertyView == null || workView == null)
        {
            CreateViews();
            return;
        }

        //Capture events
        Event e = Event.current;

        ProcessEvents(e);

        //Update work & property window positions
        workView.UpdateView(position, new Rect(0f, 0f, viewPercentage, 1f), e, curGraph);
        propertyView.UpdateView(new Rect(position.width, position.y, position.width, position.height),
                                new Rect(viewPercentage, 0f, 1f - viewPercentage, 1f), e, curGraph);

        Repaint();
    }