예제 #1
0
        public void DrawRepaintData()
        {
            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;
                    }
                }
                DrawRect(repaintData.contentRect, color);
            }

            m_RepaintDatas.Clear();
            if (onTopElement != null)
            {
                DrawRect(onTopElement.contentRect, onTopElement.color);
            }
        }
예제 #2
0
        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);
        }