ComponentWindow finalized

ScriptCore:
- ActivatorExtension: Fixed creation of default value or null class
- ImGuiExtension: added DragUIntX / DoubleX and CheckboxX
This commit is contained in:
Simon Lübeß
2024-01-30 23:40:58 +01:00
parent 09f7dfce90
commit 4830fd289e
6 changed files with 316 additions and 151 deletions
@@ -66,4 +66,13 @@ public static class ActivatorExtension
return component;
}
/// <summary>
/// Returns the null for reference types and an initialized value for structs / value types.
/// </summary>
/// <param name="type">The type to create the default value for.</param>
public static object? CreateDefaultValue(Type type)
{
return type.IsClass ? null : CreateInstanceSafe(type);
}
}