Exemplo n.º 1
0
        void OnGenerateVisualContent(MeshGenerationContext mgc)
        {
            if (m_Context.pickElement)
            {
                m_PickOverlay.Draw(mgc);
            }
            else
            {
                m_TreeViewContainer.DrawOverlay(mgc);
                m_StylesDebuggerContainer.RefreshBoxModelView(mgc);

                if (m_Context.showRepaintOverlay)
                {
                    m_RepaintOverlay.Draw(mgc);
                }
            }

            if (m_Context.showLayoutBound)
            {
                DrawLayoutBounds(mgc);
            }
            if (m_Context.showWireframe)
            {
                DrawWireframe(mgc);
            }
        }
        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();
            }
        }
        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);
            }
        }