예제 #1
0
        public void RemovePanel(DebugUI.Panel panel)
        {
            if (panel == null)
            {
                return;
            }

            m_Panels.Remove(panel);
            m_ReadOnlyPanels = m_Panels.AsReadOnly();
        }
예제 #2
0
        public void RemovePanel(DebugUI.Panel panel)
        {
            if (panel == null)
            {
                return;
            }

            m_Panels.Remove(panel);
            UpdateReadOnlyCollection();
        }
예제 #3
0
        // TODO: Use a query path here as well instead of a display name
        public void RemovePanel(string displayName)
        {
            DebugUI.Panel panel = null;

            foreach (var p in m_Panels)
            {
                if (p.displayName == displayName)
                {
                    p.onSetDirty -= OnPanelDirty;
                    panel         = p;
                    break;
                }
            }

            RemovePanel(panel);
        }
예제 #4
0
        // TODO: Optimally we should use a query path here instead of a display name
        public DebugUI.Panel GetPanel(string displayName, bool createIfNull = false)
        {
            foreach (var panel in m_Panels)
            {
                if (panel.displayName == displayName)
                {
                    return(panel);
                }
            }

            DebugUI.Panel p = null;

            if (createIfNull)
            {
                p = new DebugUI.Panel {
                    displayName = displayName
                };
                p.onSetDirty += OnPanelDirty;
                m_Panels.Add(p);
                m_ReadOnlyPanels = m_Panels.AsReadOnly();
            }

            return(p);
        }
예제 #5
0
        // TODO: Optimally we should use a query path here instead of a display name
        public DebugUI.Panel GetPanel(string displayName, bool createIfNull = false, int groupIndex = 0)
        {
            foreach (var panel in m_Panels)
            {
                if (panel.displayName == displayName)
                {
                    return(panel);
                }
            }

            DebugUI.Panel p = null;

            if (createIfNull)
            {
                p = new DebugUI.Panel {
                    displayName = displayName, groupIndex = groupIndex
                };
                p.onSetDirty += OnPanelDirty;
                m_Panels.Add(p);
                UpdateReadOnlyCollection();
            }

            return(p);
        }
예제 #6
0
 void OnPanelDirty(DebugUI.Panel panel)
 {
     onSetDirty();
 }