Exemplo n.º 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;
        }
Exemplo n.º 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);
     }
 }
Exemplo n.º 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);
        }