Browse Source

Added default editor for EditorType

Kenric Nugteren 7 months ago
parent
commit
2bf4e2ba7b
1 changed files with 2 additions and 5 deletions
  1. 2 5
      InABox.Core/Objects/Editors/Utils/EditorTypeUtils.cs

+ 2 - 5
InABox.Core/Objects/Editors/Utils/EditorTypeUtils.cs

@@ -18,21 +18,18 @@ namespace InABox.Core
 
             if (type == typeof(bool))
                 editor = new CheckBoxEditor();
-
             else if (type == typeof(DateTime))
                 editor = new DateTimeEditor();
-
             else if (type == typeof(string))
                 editor = new TextBoxEditor();
-
             else if (type.IsFloatingPoint())
                 editor = new DoubleEditor();
-
             else if (type.IsOrdinal())
                 editor = new IntegerEditor();
-
             else if (typeof(IPackable).IsAssignableFrom(type))
                 editor = new NullEditor();
+            else if(type.IsEnum)
+                editor = new EnumLookupEditor(type);
 
             return editor;
         }