Esempio n. 1
0
        private void EndPicking(ViewPanel?viewPanel)
        {
            bool expand = !viewPanel.Equals(m_CurPanel);

            m_CurPanel = viewPanel;
            if (m_CurPanel.HasValue)
            {
                m_LastWindowTitle = PickingData.GetName(m_CurPanel.Value);

                if (m_CurPanel.Value.Panel.panelDebug == null)
                {
                    m_CurPanel.Value.Panel.panelDebug = new PanelDebug();
                }

                m_CurPanel.Value.Panel.panelDebug.interceptEvents = InterceptEvents;
                m_CurPanel.Value.Panel.panelDebug.enabled         = m_Overlay;

                m_CurPanel.Value.Panel.visualTree.Dirty(ChangeType.Repaint);
                m_VisualTreeTreeView.panel = (m_CurPanel.Value.Panel);
                m_VisualTreeTreeView.Reload();

                if (expand)
                {
                    m_VisualTreeTreeView.ExpandAll();
                }
            }
            else
            {
                m_LastWindowTitle = String.Empty;
            }
        }
        private void EndPicking(ViewPanel?viewPanel)
        {
            bool newPanel = !viewPanel.Equals(m_CurPanel);

            if (newPanel)
            {
                panelDebug?.DetachDebugger(this);
            }

            m_CurPanel = viewPanel;
            if (m_CurPanel.HasValue)
            {
                m_LastWindowTitle = PickingData.GetName(m_CurPanel.Value);

                m_VisualTreeTreeView.panel = (m_CurPanel.Value.Panel);
                m_VisualTreeTreeView.Reload();

                if (newPanel)
                {
                    m_VisualTreeTreeView.ExpandAll();
                }
            }
            else
            {
                m_LastWindowTitle = String.Empty;
            }

            if (newPanel && m_CurPanel.HasValue)
            {
                m_CurPanel.Value.Panel.panelDebug.AttachDebugger(this);
            }
        }
Esempio n. 3
0
        public void Refresh()
        {
            this.m_Panels.Clear();
            Dictionary <int, Panel> .Enumerator it = UIElementsUtility.GetPanelsIterator();
            List <GUIView> list = new List <GUIView>();

            GUIViewDebuggerHelper.GetViews(list);
            bool flag = false;
            Rect rect = new Rect(3.40282347E+38f, 3.40282347E+38f, 0f, 0f);

            while (it.MoveNext())
            {
                GUIView gUIView = list.FirstOrDefault(delegate(GUIView v)
                {
                    int arg_19_0 = v.GetInstanceID();
                    KeyValuePair <int, Panel> current2 = it.Current;
                    return(arg_19_0 == current2.Key);
                });
                if (!(gUIView == null))
                {
                    List <UIElementsDebugger.ViewPanel> arg_A6_0 = this.m_Panels;
                    UIElementsDebugger.ViewPanel        item     = default(UIElementsDebugger.ViewPanel);
                    KeyValuePair <int, Panel>           current  = it.Current;
                    item.Panel = current.Value;
                    item.View  = gUIView;
                    arg_A6_0.Add(item);
                    if (rect.xMin > gUIView.screenPosition.xMin)
                    {
                        rect.xMin = gUIView.screenPosition.xMin;
                    }
                    if (rect.yMin > gUIView.screenPosition.yMin)
                    {
                        rect.yMin = gUIView.screenPosition.yMin;
                    }
                    if (rect.xMax < gUIView.screenPosition.xMax || !flag)
                    {
                        rect.xMax = gUIView.screenPosition.xMax;
                    }
                    if (rect.yMax < gUIView.screenPosition.yMax || !flag)
                    {
                        rect.yMax = gUIView.screenPosition.yMax;
                    }
                    flag = true;
                }
            }
            this.m_Labels    = new GUIContent[this.m_Panels.Count + 1];
            this.m_Labels[0] = EditorGUIUtility.TrTextContent("Select a panel", null, null);
            for (int i = 0; i < this.m_Panels.Count; i++)
            {
                this.m_Labels[i + 1] = new GUIContent(PickingData.GetName(this.m_Panels[i]));
            }
            this.screenRect = rect;
        }
 private void EndPicking(UIElementsDebugger.ViewPanel?viewPanel)
 {
     Dictionary <int, Panel> .Enumerator panelsIterator = UIElementsUtility.GetPanelsIterator();
     while (panelsIterator.MoveNext())
     {
         KeyValuePair <int, Panel> current = panelsIterator.Current;
         current.Value.panelDebug = null;
     }
     this.m_CurPanel = viewPanel;
     if (this.m_CurPanel.HasValue)
     {
         this.m_LastWindowTitle = PickingData.GetName(this.m_CurPanel.Value);
         if (this.m_CurPanel.Value.Panel.panelDebug == null)
         {
             this.m_CurPanel.Value.Panel.panelDebug = new PanelDebug();
         }
         this.m_CurPanel.Value.Panel.panelDebug.enabled = true;
         this.m_CurPanel.Value.Panel.visualTree.Dirty(ChangeType.Repaint);
         this.m_VisualTreeTreeView.panel = this.m_CurPanel.Value.Panel;
         this.m_VisualTreeTreeView.Reload();
     }
 }
Esempio n. 5
0
        private void EndPicking(ViewPanel?viewPanel)
        {
            Dictionary <int, Panel> .Enumerator it = UIElementsUtility.GetPanelsIterator();
            while (it.MoveNext())
            {
                it.Current.Value.panelDebug = null;
            }
            m_CurPanel = viewPanel;
            if (m_CurPanel.HasValue)
            {
                m_LastWindowTitle = PickingData.GetName(m_CurPanel.Value);

                if (m_CurPanel.Value.Panel.panelDebug == null)
                {
                    m_CurPanel.Value.Panel.panelDebug = new PanelDebug();
                }
                m_CurPanel.Value.Panel.panelDebug.enabled = true;

                m_CurPanel.Value.Panel.visualTree.Dirty(ChangeType.Repaint);
                m_VisualTreeTreeView.panel = (m_CurPanel.Value.Panel);
                m_VisualTreeTreeView.Reload();
            }
        }