internal override bool EndRepaint() { bool result; if (!base.enabled) { result = false; } else { PanelDebug.RepaintData repaintData = null; foreach (PanelDebug.RepaintData current in this.m_RepaintDatas) { Color c = current.color; if (this.highlightedElement != 0u) { if (this.highlightedElement == current.controlId) { repaintData = current; continue; } c = Color.gray; } PickingData.DrawRect(current.contentRect, c); } this.m_RepaintDatas.Clear(); if (repaintData != null) { PickingData.DrawRect(repaintData.contentRect, repaintData.color); } result = true; } return(result); }
internal override bool EndRepaint() { if (!enabled) { return(false); } RepaintData onTopElement = null; foreach (var repaintData in m_RepaintDatas) { var color = repaintData.color; if (highlightedElement != 0) { if (highlightedElement != repaintData.controlId) { color = Color.gray; } else { onTopElement = repaintData; continue; } } PickingData.DrawRect(repaintData.contentRect, color); } m_RepaintDatas.Clear(); if (onTopElement != null) { PickingData.DrawRect(onTopElement.contentRect, onTopElement.color); } return(true); }
internal bool Draw(ref UIElementsDebugger.ViewPanel?selectedPanel, Rect dataScreenRect) { bool result; foreach (UIElementsDebugger.ViewPanel current in this.m_Panels) { Rect screenPosition = current.View.screenPosition; screenPosition.x -= dataScreenRect.xMin; screenPosition.y -= dataScreenRect.yMin; if (GUI.Button(screenPosition, string.Format("{0}({1})", current.Panel.visualTree.name, current.View.GetInstanceID()), EditorStyles.miniButton)) { selectedPanel = new UIElementsDebugger.ViewPanel?(current); result = true; return(result); } PickingData.DrawRect(screenPosition, Color.white); } result = false; return(result); }