private static void PaintText(HierarchyItem item) { Color32 color; if (item.PrettyObject.UseDefaultTextColor || item.IsSelected) { color = EditorColors.GetDefaultTextColor(EditorUtils.IsHierarchyFocused, item.IsSelected, item.GameObject.activeInHierarchy); } else { color = item.PrettyObject.TextColor; color.a = item.GameObject.activeInHierarchy ? EditorColors.TextAlphaObjectEnabled : EditorColors.TextAlphaObjectDisabled; } GUIStyle labelGUIStyle = new GUIStyle { normal = new GUIStyleState { textColor = color }, fontStyle = item.PrettyObject.FontStyle, alignment = item.PrettyObject.Alignment, fontSize = item.PrettyObject.FontSize, font = item.PrettyObject.Font }; if (item.PrettyObject.TextDropShadow) { EditorGUI.DropShadowLabel(item.TextRect, item.PrettyObject.name, labelGUIStyle); } else { EditorGUI.LabelField(item.TextRect, item.PrettyObject.name, labelGUIStyle); } }
private static void PaintBackground(HierarchyItem item) { Color32 color; if (item.PrettyObject.UseDefaultBackgroundColor || item.IsSelected) { color = EditorColors.GetDefaultBackgroundColor(EditorUtils.IsHierarchyFocused, item.IsSelected); } else { color = item.PrettyObject.BackgroundColor; } EditorGUI.DrawRect(item.BackgroundRect, color); }
private static void PaintText(HierarchyItem item) { Color color = item.IsSelected ? EditorColors.GetDefaultTextColor(EditorUtils.IsHierarchyFocused, item.IsSelected) : item.PrettyObject.TextColor; GUIStyle labelGUIStyle = new GUIStyle { normal = new GUIStyleState { textColor = color }, fontStyle = item.PrettyObject.FontStyle, alignment = item.PrettyObject.Alignment, fontSize = item.PrettyObject.FontSize, font = item.PrettyObject.Font }; if (item.PrettyObject.TextDropShadow) { EditorGUI.DropShadowLabel(item.TextRect, item.PrettyObject.name, labelGUIStyle); } else { EditorGUI.LabelField(item.TextRect, item.PrettyObject.name, labelGUIStyle); } }
private static void PainBackground(HierarchyItem item) { Color32 color = item.IsSelected ? EditorColors.GetDefaultBackgroundColor(EditorUtils.IsHierarchyFocused, item.IsSelected) : item.PrettyObject.BackgroundColor; EditorGUI.DrawRect(item.BackgroundRect, color); }