public static void DrawLabel(this UnityLabel current, GUIStyle style = null, bool indention = true)
        {
            style = style ?? EditorStyles.label;
            var layout = style.CreateLayout() ?? Class.CreateLayout();

            if (indention)
            {
                EditorUI.Draw(() => EditorGUILayout.LabelField(current, style, layout), indention);
                return;
            }
            EditorUI.Draw(() => GUILayout.Label(current, style, layout), indention);
        }
 public static Enum Draw(this Enum current, UnityLabel label = null, GUIStyle style = null, bool indention = true)
 {
     style = style ?? EditorStyles.popup;
     return(EditorGUIExtension.Draw <Enum>(() => EditorGUILayout.EnumPopup(label, current, style, style.CreateLayout()), indention));
 }
 public static bool Draw(this bool current, UnityLabel label = null, GUIStyle style = null, bool indention = true)
 {
     style = style ?? EditorStyles.toggle;
     return(EditorGUIExtension.Draw <bool>(() => EditorGUILayout.Toggle(label, current, style, style.CreateLayout()), indention));
 }
 public static float Draw(this float current, UnityLabel label = null, GUIStyle style = null, bool indention = true)
 {
     style = style ?? EditorStyles.numberField;
     return(EditorGUIExtension.Draw <float>(() => EditorGUILayout.FloatField(label, current, style, style.CreateLayout()), indention));
 }
 public static string Draw(this string current, UnityLabel label = null, GUIStyle style = null, bool indention = true)
 {
     style = style ?? EditorStyles.textField;
     return(EditorGUIExtension.Draw <string>(() => EditorGUILayout.TextField(label, current, style, style.CreateLayout()), indention));
 }
 public static void DrawLabel(this UnityLabel current, GUIStyle style = null, bool indention = true)
 {
     style = style ?? EditorStyles.label;
     if (indention)
     {
         EditorGUIExtension.Draw(() => EditorGUILayout.LabelField(current, style, style.CreateLayout()), indention);
         return;
     }
     EditorGUIExtension.Draw(() => GUILayout.Label(current, style), indention);
 }