예제 #1
0
        public static void DrawLine(ColorValue color = ColorValue.Grey)
        {
            var previousColor = GUI.color;

            GUI.color = EditorDrawUtility.GetColor(color);
            GUILayout.Box(GUIContent.none, GUIStyleUtility.HorizontalLine(false));
            GUI.color = previousColor;
        }
예제 #2
0
 public override void BeginDrawGroup(string label, bool drawName, int indentLevel)
 {
     GUILayout.BeginVertical(GUIStyleUtility.LightBox(indentLevel));
     EditorGUI.indentLevel++;
     if (drawName && !string.IsNullOrEmpty(label))
     {
         EditorGUILayout.LabelField(label, GUIStyleUtility.BoxGroupLabel);
     }
 }
예제 #3
0
        public bool BeginFoldout(bool foldout, string label, int indentLevel)
        {
            GUILayout.BeginVertical(GUIStyleUtility.FoldGroupHeader(indentLevel));
            EditorGUI.indentLevel = 1;

            GUILayout.BeginVertical(GUIStyleUtility.FoldGroupHeaderContent);
            foldout = EditorDrawUtility.DrawFoldout(foldout, label, GUIStyleUtility.BoldFoldout);
            GUILayout.EndVertical();

            if (foldout)
            {
                return(true);
            }
            EditorGUI.indentLevel = indentLevel;
            GUILayout.EndVertical();
            return(false);
        }