mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 11:26:27 +00:00
Profile editor - Added effect renaming
Core - Fixed effect loading Core - Fixed some effects not applying on per-LED brushes
This commit is contained in:
1 parent
2bf36fbf20
commit
cd8656cb0d
18 files changed
+292
-79
No files matched your search
@@ -35,7 +35,6 @@ namespace Artemis.Core.LayerBrushes
|
||||
canvas.SetMatrix(canvas.TotalMatrix.PreConcat(Layer.GetTransformMatrix(true, false, false, true).Invert()));
|
||||
|
||||
using SKPath pointsPath = new();
|
||||
using SKPaint ledPaint = new();
|
||||
foreach (ArtemisLed artemisLed in Layer.Leds)
|
||||
{
|
||||
pointsPath.AddPoly(new[]
|
||||
@@ -61,7 +60,7 @@ namespace Artemis.Core.LayerBrushes
|
||||
continue;
|
||||
|
||||
// Let the brush determine the color
|
||||
ledPaint.Color = GetColor(artemisLed, renderPoint);
|
||||
paint.Color = GetColor(artemisLed, renderPoint);
|
||||
|
||||
SKRect ledRectangle = SKRect.Create(
|
||||
artemisLed.AbsoluteRectangle.Left - Layer.Bounds.Left,
|
||||
@@ -70,7 +69,7 @@ namespace Artemis.Core.LayerBrushes
|
||||
artemisLed.AbsoluteRectangle.Height
|
||||
);
|
||||
|
||||
canvas.DrawRect(ledRectangle, ledPaint);
|
||||
canvas.DrawRect(ledRectangle, paint);
|
||||
}
|
||||
}, "Failed to render");
|
||||
}
|
||||
|
||||
@@ -222,8 +222,8 @@ namespace Artemis.Core.LayerEffects
|
||||
/// <inheritdoc />
|
||||
public void Load()
|
||||
{
|
||||
Name = LayerEffectEntity.Name;
|
||||
HasBeenRenamed = LayerEffectEntity.HasBeenRenamed;
|
||||
Name = HasBeenRenamed ? LayerEffectEntity.Name : Descriptor.DisplayName;
|
||||
Order = LayerEffectEntity.Order;
|
||||
}
|
||||
|
||||
|
||||
@@ -87,6 +87,7 @@ public class LayerEffectDescriptor
|
||||
else
|
||||
{
|
||||
effect.LayerEffectEntity = new LayerEffectEntity();
|
||||
effect.Name = DisplayName;
|
||||
effect.Initialize();
|
||||
effect.Save();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user