public void AddPanelDepth(Transform parent) { if (DepthPanelList.Count > 0) { if (DepthPanelList[DepthPanelList.Count - 1].transform == parent) { return; } } currentMaxDepth += UICommon.UI_DEPTH_INCREMENTAL; DepthPanelCollection depthPanelCollection = new DepthPanelCollection(parent); UIPanel[] panels = parent.GetComponentsInChildren <UIPanel> (true); foreach (UIPanel panel in panels) { if (panel != null) { DepthPanel depthPanel = new DepthPanel(panel.depth, panel); depthPanelCollection.Add(depthPanel); panel.depth += currentMaxDepth; } } DepthPanelList.Add(depthPanelCollection); }
private void PIP_CheckStateChanged(object sender, EventArgs e) { switch (PIP.CheckState) { case CheckState.Checked: //DepthPanel.Bounds = SetHalfSize(ColorPanel.Bounds); DepthPanel.Show(); break; case CheckState.Indeterminate: //DepthPanel.Bounds = SetQuarterSize(ColorPanel.Bounds); DepthPanel.Show(); break; case CheckState.Unchecked: DepthPanel.Hide(); break; } }
public void Add(DepthPanel depthPanel) { depthList.Add(depthPanel); }