Exemplo n.º 1
0
 public virtual void AddItemsToMenu(GenericMenu menu)
 {
     menu.AddItem(new GUIContent("Large TreeView"), this.m_TestType == TreeViewTestWindow.TestType.LargeTreesWithStandardGUI, delegate
     {
         this.m_TestType = TreeViewTestWindow.TestType.LargeTreesWithStandardGUI;
     });
     menu.AddItem(new GUIContent("Custom Item Height TreeView"), this.m_TestType == TreeViewTestWindow.TestType.TreeWithCustomItemHeight, delegate
     {
         this.m_TestType = TreeViewTestWindow.TestType.TreeWithCustomItemHeight;
     });
 }
Exemplo n.º 2
0
 private void OnGUI()
 {
     TreeViewTestWindow.TestType testType = this.m_TestType;
     if (testType != TreeViewTestWindow.TestType.LargeTreesWithStandardGUI)
     {
         if (testType == TreeViewTestWindow.TestType.TreeWithCustomItemHeight)
         {
             this.TestTreeWithCustomItemHeights();
         }
     }
     else
     {
         this.TestLargeTreesWithFixedItemHeightAndPingingAndFraming();
     }
 }
 public virtual void AddItemsToMenu(GenericMenu menu)
 {
   menu.AddItem(new GUIContent("Large TreeView"), this.m_TestType == TreeViewTestWindow.TestType.LargeTreesWithStandardGUI, (GenericMenu.MenuFunction) (() => this.m_TestType = TreeViewTestWindow.TestType.LargeTreesWithStandardGUI));
   menu.AddItem(new GUIContent("Custom Item Height TreeView"), this.m_TestType == TreeViewTestWindow.TestType.TreeWithCustomItemHeight, (GenericMenu.MenuFunction) (() => this.m_TestType = TreeViewTestWindow.TestType.TreeWithCustomItemHeight));
 }