private void BuildUI()
        {
            BuildToolbox(m_ExpressionGraph);

            m_NodeEditor = new ExpressionInspector();
            m_ResultView = new ExpressionResultView(m_Expression);

            m_VerticalResizer   = new VisualSplitter(m_NodeEditor, m_ResultView, FlexDirection.Column);
            m_HorizontalResizer = new VisualSplitter(m_ExpressionGraph, m_VerticalResizer, FlexDirection.Row);

            rootVisualElement.Add(m_HorizontalResizer);
            rootVisualElement.style.flexDirection = FlexDirection.Row;
            rootVisualElement.RegisterCallback <GeometryChangedEvent>(OnSizeChange);

            EditorApplication.delayCall += () =>
            {
                if (m_GraphViewSplitterPosition == 0f)
                {
                    m_GraphViewSplitterPosition = position.width * 0.7f;
                }

                m_NodeEditor.style.height     = m_SearchViewSplitterPosition;
                m_ExpressionGraph.style.width = m_GraphViewSplitterPosition;
            };
        }
예제 #2
0
        private void BuildUI()
        {
            BuildToolbox(rootVisualElement);
            BuildGraphToolbar(m_ExpressionGraph);

            m_NodeEditor = new ExpressionInspector();
            m_ResultView = new ExpressionResultView(m_Expression);
            m_ResultView.style.flexGrow = 1f;

            m_InspectorElement = new VisualElement();
            m_InspectorElement.style.flexDirection = FlexDirection.Column;
            m_InspectorElement.Add(m_NodeEditor);
            m_InspectorElement.Add(m_ResultView);
            m_HorizontalResizer = new VisualSplitter(m_ExpressionGraph, m_InspectorElement, FlexDirection.Row);

            rootVisualElement.Add(m_HorizontalResizer);
            rootVisualElement.style.flexDirection = FlexDirection.Row;
            rootVisualElement.RegisterCallback <GeometryChangedEvent>(OnSizeChange);

            UpdateWindowGeometry();

            EditorApplication.delayCall += () =>
            {
                if (m_GraphViewSplitterPosition == 0f)
                {
                    m_GraphViewSplitterPosition = position.width * 0.7f;
                }

                m_ExpressionGraph.style.width = m_GraphViewSplitterPosition;
                m_InspectorElement.MarkDirtyRepaint();
            };
        }
예제 #3
0
        public override VisualElement CreateInspectorGUI()
        {
            if (m_ExpressionResultView == null)
            {
                m_ExpressionResultView = new ExpressionResultView(m_Expression);
            }

            m_ExpressionResultView.RegisterCallback <GeometryChangedEvent>(OnSizeChange);
            EditorApplication.delayCall += () => m_ExpressionResultView.style.height = 500;

            return(m_ExpressionResultView);
        }
예제 #4
0
        private void BuildUI()
        {
            BuildToolbox(rootVisualElement);
            BuildGraphToolbar(m_ExpressionGraph);

            m_NodeEditor = new ExpressionInspector();
            m_ResultView = new ExpressionResultView(m_Expression);
            m_ResultView.style.flexGrow = 1f;

            m_InspectorElement = new VisualElement();
            m_InspectorElement.style.flexDirection = FlexDirection.Column;
            m_InspectorElement.Add(m_NodeEditor);
            m_InspectorElement.Add(m_ResultView);
            m_HorizontalResizer = new VisualSplitter(m_ExpressionGraph, m_InspectorElement, FlexDirection.Row);

            rootVisualElement.Add(m_HorizontalResizer);
            rootVisualElement.style.flexDirection = FlexDirection.Row;
            rootVisualElement.RegisterCallback <GeometryChangedEvent>(OnSizeChange);

            EditorApplication.update += FixWindowSize;
        }