public void RemovePanel(DebugUI.Panel panel) { if (panel == null) { return; } m_Panels.Remove(panel); m_ReadOnlyPanels = m_Panels.AsReadOnly(); }
public void RemovePanel(DebugUI.Panel panel) { if (panel == null) { return; } m_Panels.Remove(panel); UpdateReadOnlyCollection(); }
// 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); }
// 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); }
// 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); }
void OnPanelDirty(DebugUI.Panel panel) { onSetDirty(); }