예제 #1
0
        void OnGUI()
        {
            if (simpleTreeView == null)
            {
                return;
            }

            if (CurrentFrame == null)
            {
                CurrentFrame = new Frame();
            }

            activeDebugger = this;

            tab = GUILayout.Toolbar(tab, new string[] { "Frames", "Server Statistics" });
            switch (tab)
            {
            case 0:
                simpleTreeView.Debugger = this;
                simpleTreeView.Reload();
                simpleTreeView.OnGUI(new Rect(0, 20, position.width, position.height));
                break;

            case 1:
                foreach (var line in Statistics)
                {
                    GUILayout.Label(line);
                }
                Repaint();
                break;
            }
        }
예제 #2
0
 private void OnGUI()
 {
     GUILayout.Label("Evolution", EditorStyles.boldLabel);
     _simpleTreeView.OnGUI(new Rect(0, 60, position.width, position.height));
     GUILayout.BeginArea(new Rect(0, _simpleTreeView.totalHeight + 30, position.width, position.height));
     GUILayout.Label("Food", EditorStyles.boldLabel);
     GUILayout.EndArea();
 }
예제 #3
0
    void TreeView(Rect position)
    {
        if (Event.current.button == 0 && Event.current.type == EventType.MouseDown && position.Contains(Event.current.mousePosition))
        {
            _simpleTreeView.SetSelection(new List <int>());
            this.selectedSpriteIndex = -1;
        }

        _simpleTreeView.OnGUI(position);

        if (Event.current.button == 1 && Event.current.type == EventType.MouseUp && position.Contains(Event.current.mousePosition))
        {
            IList <int> selections = _simpleTreeView.GetSelection();
            int         selectedId = -1;
            if (selections.Count != 0)
            {
                selectedId = _simpleTreeView.GetSelection() [0];
            }
            TreeViewMenu(new Rect(Event.current.mousePosition.x, Event.current.mousePosition.y - 10, 0, 0), selectedId);
        }
    }
예제 #4
0
 void OnGUI()
 {
     m_SimpleTreeView.OnGUI(new UnityEngine.Rect(0, 0, position.width, position.height));
 }