mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 11:26:27 +00:00
Broke the surface editor
Added device properties to surface editor though!
This commit is contained in:
1 parent
086f2fc1f9
commit
240efb2907
20 files changed
+444
-79
No files matched your search
@@ -63,12 +63,18 @@ namespace Artemis.Core.Models.Surface
|
||||
set => DeviceEntity.Rotation = value;
|
||||
}
|
||||
|
||||
public double Scale
|
||||
{
|
||||
get => DeviceEntity.Scale;
|
||||
set => DeviceEntity.Scale = value;
|
||||
}
|
||||
|
||||
public int ZIndex
|
||||
{
|
||||
get => DeviceEntity.ZIndex;
|
||||
set => DeviceEntity.ZIndex = value;
|
||||
}
|
||||
|
||||
|
||||
internal void ApplyToEntity()
|
||||
{
|
||||
// Other properties are computed
|
||||
@@ -79,8 +85,10 @@ namespace Artemis.Core.Models.Surface
|
||||
{
|
||||
RgbDevice.Location = new Point(DeviceEntity.X, DeviceEntity.Y);
|
||||
RgbDevice.Rotation = DeviceEntity.Rotation;
|
||||
RgbDevice.Scale = DeviceEntity.Scale;
|
||||
|
||||
CalculateRenderProperties();
|
||||
OnDeviceUpdated();
|
||||
}
|
||||
|
||||
internal void CalculateRenderProperties()
|
||||
@@ -103,10 +111,16 @@ namespace Artemis.Core.Models.Surface
|
||||
path.FillMode = FillMode.Winding;
|
||||
RenderPath = path;
|
||||
}
|
||||
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"[{RgbDevice.DeviceInfo.DeviceType}] {RgbDevice.DeviceInfo.DeviceName} - {X}.{Y}.{ZIndex}";
|
||||
}
|
||||
|
||||
public event EventHandler DeviceUpdated;
|
||||
protected virtual void OnDeviceUpdated()
|
||||
{
|
||||
DeviceUpdated?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user