Exemple #1
0
        private static void DrawSeparators(int instanceID, Rect selectionRect)
        {
            // EditorOnly objects are only removed from build if they're not childrens
            if (!data.separator.GetEnabled() || data.separator.color.a <= 0 || !currentItem.isSeparator)
            {
                return;
            }

            // Adds color on top of the label
            if (data.separator.drawFill)
            {
                HierarchyRenderer.DrawFullItem(selectionRect, data.separator.color);
            }
            else
            {
                HierarchyRenderer.DrawSelection(selectionRect, data.separator.color);
            }
        }
Exemple #2
0
        private static void DrawAlternatingBG(int instanceID, Rect selectionRect)
        {
            if (!data.alterRowShading.GetEnabled())
            {
                return;
            }

            var isOdd = Mathf.FloorToInt(((selectionRect.y - 4) / ROW_HEIGHT) % 2) != 0;

            if (isOdd)
            {
                return;
            }

            if (data.alterRowShading.drawFill)
            {
                HierarchyRenderer.DrawFullItem(selectionRect, data.alterRowShading.color);
            }
            else
            {
                HierarchyRenderer.DrawSelection(selectionRect, data.alterRowShading.color);
            }
        }