Core - Create default instances for properties

UI - Added configurable width/height for brush dialogs
This commit is contained in:
Robert committed 2021-04-08 00:39:26 +02:00
1 parent f4e3011957
commit 903e434137
12 files changed
+109 -14

No files matched your search

@@ -9,6 +9,14 @@ namespace Artemis.Core
{
private readonly Random _rand;
/// <summary>
/// Creates a new instance of the <see cref="FloatRange" /> class
/// </summary>
public FloatRange()
{
_rand = new Random();
}
/// <summary>
/// Creates a new instance of the <see cref="FloatRange" /> class
/// </summary>
@@ -9,6 +9,14 @@ namespace Artemis.Core
{
private readonly Random _rand;
/// <summary>
/// Creates a new instance of the <see cref="IntRange" /> class
/// </summary>
public IntRange()
{
_rand = new Random();
}
/// <summary>
/// Creates a new instance of the <see cref="IntRange" /> class
/// </summary>
@@ -34,7 +34,7 @@ namespace Artemis.Core
CurrentValue = default!;
DefaultValue = default!;
_baseValue = default!;
_baseValue = typeof(T).IsValueType ? default! : Activator.CreateInstance<T>();
_keyframes = new List<LayerPropertyKeyframe<T>>();
}