Profile editor - Added most properties

This commit is contained in:
Robert committed 2022-01-12 22:11:40 +01:00
1 parent c04bff1f48
commit 022beb6a48
62 files changed
+1424 -251

No files matched your search

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Reflection;
using Humanizer;
@@ -92,7 +93,7 @@ namespace Artemis.Core
/// </summary>
/// <param name="value">The value to check</param>
/// <returns><see langword="true" /> if the value is of a numeric type, otherwise <see langword="false" /></returns>
public static bool IsNumber(this object value)
public static bool IsNumber([NotNullWhenAttribute(true)] this object? value)
{
return value is sbyte
|| value is byte
+5 -1
View File
@@ -729,7 +729,7 @@ namespace Artemis.Core
// Ensure the brush reference matches the brush
LayerBrushReference? current = General.BrushReference.BaseValue;
if (!descriptor.MatchesLayerBrushReference(current))
General.BrushReference.BaseValue = new LayerBrushReference(descriptor);
General.BrushReference.SetCurrentValue(new LayerBrushReference(descriptor), null);
ActivateLayerBrush();
}
@@ -760,6 +760,10 @@ namespace Artemis.Core
: null;
descriptor?.CreateInstance(this);
General.ShapeType.IsHidden = LayerBrush != null && !LayerBrush.SupportsTransformation;
General.BlendMode.IsHidden = LayerBrush != null && !LayerBrush.SupportsTransformation;
Transform.IsHidden = LayerBrush != null && !LayerBrush.SupportsTransformation;
OnLayerBrushUpdated();
ClearBrokenState("Failed to initialize layer brush");
}