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);
        }
예제 #2
0
 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));
 }
예제 #3
0
 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));
 }
예제 #4
0
 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));
 }
예제 #5
0
 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));
 }
예제 #6
0
 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);
 }