mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-06 07:36:26 +02:00
UI: Rainbow cycling speed settings
Note: this setting is global, even though it appears in the settings for the individual gamepad. This is simply for consistency; you access all the rainbow stuff in one place.
This commit is contained in:
parent
11f29361eb
commit
1a42d1396c
6 changed files with 58 additions and 23 deletions
|
@ -1,7 +1,13 @@
|
|||
using Avalonia.Media;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using Gommon;
|
||||
using Humanizer;
|
||||
using Ryujinx.Ava.UI.Helpers;
|
||||
using Ryujinx.Ava.Utilities.Configuration;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
||||
namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||
{
|
||||
|
@ -21,6 +27,19 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||
|
||||
[ObservableProperty] private bool _enableLedChanging;
|
||||
[ObservableProperty] private Color _ledColor;
|
||||
|
||||
public string RainbowSpeedText => RainbowSpeed.ToString(CultureInfo.CurrentCulture);
|
||||
|
||||
public float RainbowSpeed
|
||||
{
|
||||
get => ConfigurationState.Instance.Hid.RainbowSpeed;
|
||||
set
|
||||
{
|
||||
ConfigurationState.Instance.Hid.RainbowSpeed.Value = value;
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(RainbowSpeedText));
|
||||
}
|
||||
}
|
||||
|
||||
public bool ShowLedColorPicker => !TurnOffLed && !UseRainbowLed;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue