コード例 #1
0
        public override void Refresh()
        {
            if (m_PickElement)
            {
                m_PickOverlay.Draw();
            }

            if (panel != null)
            {
                var rootElement = panel.GetRootVisualElement();
                var clipRect    = rootElement != null ? rootElement.worldBound : GUIClip.topmostRect;

                if (m_ShowLayoutBound)
                {
                    DrawLayoutBounds(clipRect);
                }

                if (!m_PickElement && m_ShowRepaintOverlay)
                {
                    m_RepaintOverlay.Draw(clipRect);
                    if (m_RepaintOverlay.overlayCount > 0)
                    {
                        panelDebug.MarkDirtyRepaint();
                    }
                }
            }

            if (!m_PickElement)
            {
                var selectedElement = m_DebuggerSelection.element;
                m_TreeViewContainer.RebuildTree(panelDebug);
                m_TreeViewContainer.DrawOverlay();

                //we should not lose the selection when the tree has changed.
                if (selectedElement != m_DebuggerSelection.element)
                {
                    if (m_DebuggerSelection.element == null && selectedElement.panel == panelDebug.panel)
                    {
                        SelectElement(selectedElement);
                    }
                }

                m_StylesDebuggerContainer.Refresh();

                Repaint();
            }
        }
コード例 #2
0
        void OnGenerateVisualContent(MeshGenerationContext mgc)
        {
            if (m_PickElement)
            {
                m_PickOverlay.Draw(mgc);
            }

            if (!m_PickElement)
            {
                var selectedElement = m_DebuggerSelection.element;
                m_TreeViewContainer.RebuildTree(panelDebug);
                m_TreeViewContainer.DrawOverlay(mgc);

                //we should not lose the selection when the tree has changed.
                if (selectedElement != m_DebuggerSelection.element)
                {
                    if (m_DebuggerSelection.element == null && selectedElement.panel == panelDebug.panel)
                    {
                        SelectElement(selectedElement);
                    }
                }

                m_StylesDebuggerContainer.Refresh(mgc);

                Repaint();
            }

            if (m_ShowLayoutBound)
            {
                DrawLayoutBounds(mgc);
            }

            if (!m_PickElement && m_ShowRepaintOverlay)
            {
                m_RepaintOverlay.Draw(mgc);
            }
        }