mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
WIP - Added a BitmapBrush to replace the GraphicsDecorator
This commit is contained in:
1 parent
146c545f02
commit
5dbd35208b
15 files changed
+399
-116
No files matched your search
@@ -1,4 +1,7 @@
|
||||
using Artemis.Core.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Artemis.Core.Services;
|
||||
using Artemis.Core.Services.Storage.Interfaces;
|
||||
using Artemis.UI.Ninject.Factories;
|
||||
using Artemis.UI.Screens.Settings.Debug;
|
||||
@@ -34,10 +37,32 @@ namespace Artemis.UI.Screens.Settings
|
||||
_deviceSettingsViewModelFactory = deviceSettingsViewModelFactory;
|
||||
|
||||
DeviceSettingsViewModels = new BindableCollection<DeviceSettingsViewModel>();
|
||||
|
||||
RenderScales = new List<Tuple<string, double>> {new Tuple<string, double>("10%", 0.1)};
|
||||
for (var i = 25; i <= 100; i += 25)
|
||||
RenderScales.Add(new Tuple<string, double>(i + "%", i / 100.0));
|
||||
|
||||
TargetFrameRates = new List<Tuple<string, int>>();
|
||||
for (var i = 10; i <= 30; i += 5)
|
||||
TargetFrameRates.Add(new Tuple<string, int>(i + " FPS", i));
|
||||
}
|
||||
|
||||
public BindableCollection<DeviceSettingsViewModel> DeviceSettingsViewModels { get; set; }
|
||||
|
||||
public List<Tuple<string, double>> RenderScales { get; set; }
|
||||
|
||||
public Tuple<string, double> SelectedRenderScale
|
||||
{
|
||||
get => RenderScales.FirstOrDefault(s => Math.Abs(s.Item2 - RenderScale) < 0.01);
|
||||
set => RenderScale = value.Item2;
|
||||
}
|
||||
|
||||
public Tuple<string, int> SelectedTargetFrameRate
|
||||
{
|
||||
get => TargetFrameRates.FirstOrDefault(t => Math.Abs(t.Item2 - TargetFrameRate) < 0.01);
|
||||
set => TargetFrameRate = value.Item2;
|
||||
}
|
||||
|
||||
public double RenderScale
|
||||
{
|
||||
get => _settingsService.GetSetting("Core.RenderScale", 1.0).Value;
|
||||
@@ -48,6 +73,8 @@ namespace Artemis.UI.Screens.Settings
|
||||
}
|
||||
}
|
||||
|
||||
public List<Tuple<string, int>> TargetFrameRates { get; set; }
|
||||
|
||||
public int TargetFrameRate
|
||||
{
|
||||
get => _settingsService.GetSetting("Core.TargetFrameRate", 25).Value;
|
||||
|
||||
Reference in new issue
Block a user