private static void DrawItemBackground(Rect rect, bool isScene, bool isSelected, bool isHovered, bool isFocused)
        {
            if (Event.current.type != EventType.Repaint)
            {
                return;
            }

            rect.width = utilityBarWidth;

            if (isScene)
            {
                if (isSelected)
                {
                    TreeViewGUI.Styles.selectionStyle.Draw(rect, false, false, true, isFocused);
                }
            }
            else
            {
                using (new GUI.BackgroundColorScope(Styles.GetItemBackgroundColor(isHovered, isSelected, isFocused))
                       )
                {
                    GUI.Label(rect, GUIContent.none,
                              GameObjectTreeViewGUI.GameObjectStyles.hoveredItemBackgroundStyle);
                }
            }
        }
Beispiel #2
0
        private static void DrawItemBackground(Rect rect, bool isSelected, bool isHovered, bool isFocused)
        {
            if (Event.current.type == EventType.Repaint)
            {
                rect.width = utilityBarWidth;

                using (new GUI.BackgroundColorScope(Styles.GetItemBackgroundColor(isHovered, isSelected, isFocused)))
                {
                    GUI.Label(rect, GUIContent.none, GameObjectTreeViewGUI.GameObjectStyles.hoveredItemBackgroundStyle);
                }
            }
        }