Exemple #1
0
        private void TestLargeTreesWithFixedItemHeightAndPingingAndFraming()
        {
            Rect rect  = new Rect(0f, 0f, base.position.width / 2f, base.position.height);
            Rect rect4 = new Rect(base.position.width / 2f, 0f, base.position.width / 2f, base.position.height);

            if (this.m_TreeViewTest == null)
            {
                this.m_BackendData = new BackendData();
                this.m_BackendData.GenerateData(0xf4240);
                bool lazy = false;
                this.m_TreeViewTest = new TreeViewTest(this, lazy);
                this.m_TreeViewTest.Init(rect, this.m_BackendData);
                lazy = true;
                this.m_TreeViewTest2 = new TreeViewTest(this, lazy);
                this.m_TreeViewTest2.Init(rect4, this.m_BackendData);
            }
            this.m_TreeViewTest.OnGUI(rect);
            this.m_TreeViewTest2.OnGUI(rect4);
            EditorGUI.DrawRect(new Rect(rect.xMax - 1f, 0f, 2f, base.position.height), new Color(0.4f, 0.4f, 0.4f, 0.8f));
        }
Exemple #2
0
        void TestLargeTreesWithFixedItemHeightAndPingingAndFraming()
        {
            Rect leftRect  = new Rect(0, 0, position.width / 2, position.height);
            Rect rightRect = new Rect(position.width / 2, 0, position.width / 2, position.height);

            if (m_TreeViewTest == null)
            {
                m_BackendData = new BackendData();
                m_BackendData.GenerateData(1000000);

                bool lazy = false;
                m_TreeViewTest = new TreeViewTest(this, lazy);
                m_TreeViewTest.Init(leftRect, m_BackendData);

                lazy            = true;
                m_TreeViewTest2 = new TreeViewTest(this, lazy);
                m_TreeViewTest2.Init(rightRect, m_BackendData);
            }

            m_TreeViewTest.OnGUI(leftRect);
            m_TreeViewTest2.OnGUI(rightRect);
            EditorGUI.DrawRect(new Rect(leftRect.xMax - 1, 0, 2, position.height), new Color(0.4f, 0.4f, 0.4f, 0.8f));
        }