mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Device properties - Changed doubles to floats for RGB.NET update
This commit is contained in:
parent
da90c0d3a1
commit
5bcba8a4a5
@ -16,16 +16,16 @@ namespace Artemis.UI.Screens.Settings.Device.Tabs
|
||||
private readonly ICoreService _coreService;
|
||||
private readonly IMessageService _messageService;
|
||||
private readonly IRgbService _rgbService;
|
||||
private double _blueScale;
|
||||
private float _blueScale;
|
||||
private SKColor _currentColor;
|
||||
private bool _displayOnDevices;
|
||||
private double _greenScale;
|
||||
private double _initialBlueScale;
|
||||
private double _initialGreenScale;
|
||||
private double _initialRedScale;
|
||||
private double _redScale;
|
||||
private float _greenScale;
|
||||
private float _initialBlueScale;
|
||||
private float _initialGreenScale;
|
||||
private float _initialRedScale;
|
||||
private float _redScale;
|
||||
private int _rotation;
|
||||
private double _scale;
|
||||
private float _scale;
|
||||
private int _x;
|
||||
private int _y;
|
||||
|
||||
@ -57,7 +57,7 @@ namespace Artemis.UI.Screens.Settings.Device.Tabs
|
||||
set => SetAndNotify(ref _y, value);
|
||||
}
|
||||
|
||||
public double Scale
|
||||
public float Scale
|
||||
{
|
||||
get => _scale;
|
||||
set => SetAndNotify(ref _scale, value);
|
||||
@ -69,19 +69,19 @@ namespace Artemis.UI.Screens.Settings.Device.Tabs
|
||||
set => SetAndNotify(ref _rotation, value);
|
||||
}
|
||||
|
||||
public double RedScale
|
||||
public float RedScale
|
||||
{
|
||||
get => _redScale;
|
||||
set => SetAndNotify(ref _redScale, value);
|
||||
}
|
||||
|
||||
public double GreenScale
|
||||
public float GreenScale
|
||||
{
|
||||
get => _greenScale;
|
||||
set => SetAndNotify(ref _greenScale, value);
|
||||
}
|
||||
|
||||
public double BlueScale
|
||||
public float BlueScale
|
||||
{
|
||||
get => _blueScale;
|
||||
set => SetAndNotify(ref _blueScale, value);
|
||||
@ -101,9 +101,9 @@ namespace Artemis.UI.Screens.Settings.Device.Tabs
|
||||
|
||||
public void ApplyScaling()
|
||||
{
|
||||
Device.RedScale = RedScale / 100d;
|
||||
Device.GreenScale = GreenScale / 100d;
|
||||
Device.BlueScale = BlueScale / 100d;
|
||||
Device.RedScale = RedScale / 100f;
|
||||
Device.GreenScale = GreenScale / 100f;
|
||||
Device.BlueScale = BlueScale / 100f;
|
||||
}
|
||||
|
||||
public void BrowseCustomLayout(object sender, MouseEventArgs e)
|
||||
@ -139,9 +139,9 @@ namespace Artemis.UI.Screens.Settings.Device.Tabs
|
||||
Device.Y = Y;
|
||||
Device.Scale = Scale;
|
||||
Device.Rotation = Rotation;
|
||||
Device.RedScale = RedScale / 100d;
|
||||
Device.GreenScale = GreenScale / 100d;
|
||||
Device.BlueScale = BlueScale / 100d;
|
||||
Device.RedScale = RedScale / 100f;
|
||||
Device.GreenScale = GreenScale / 100f;
|
||||
Device.BlueScale = BlueScale / 100f;
|
||||
|
||||
_coreService.ModuleRenderingDisabled = false;
|
||||
}
|
||||
@ -159,9 +159,9 @@ namespace Artemis.UI.Screens.Settings.Device.Tabs
|
||||
Y = (int) Device.Y;
|
||||
Scale = Device.Scale;
|
||||
Rotation = (int) Device.Rotation;
|
||||
RedScale = Device.RedScale * 100d;
|
||||
GreenScale = Device.GreenScale * 100d;
|
||||
BlueScale = Device.BlueScale * 100d;
|
||||
RedScale = Device.RedScale * 100f;
|
||||
GreenScale = Device.GreenScale * 100f;
|
||||
BlueScale = Device.BlueScale * 100f;
|
||||
//we need to store the initial values to be able to restore them when the user clicks "Cancel"
|
||||
_initialRedScale = Device.RedScale;
|
||||
_initialGreenScale = Device.GreenScale;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user