mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-04-21 14:12:54 +00:00
Improve Motion/Rumble/LED Windows
Due to resizing issues.
This commit is contained in:
@@ -29,7 +29,20 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||
[ObservableProperty]
|
||||
public partial Color LedColor { get; set; }
|
||||
|
||||
public string RainbowSpeedText => RainbowSpeed.ToString("F2", CultureInfo.CurrentCulture);
|
||||
public string RainbowSpeedText
|
||||
{
|
||||
get
|
||||
{
|
||||
if (RainbowSpeed == 10)
|
||||
{
|
||||
return RainbowSpeed.ToString("F1", CultureInfo.CurrentCulture);
|
||||
}
|
||||
else
|
||||
{
|
||||
return RainbowSpeed.ToString("F2", CultureInfo.CurrentCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public float RainbowSpeed
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||
{
|
||||
@@ -22,8 +23,36 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||
[ObservableProperty]
|
||||
public partial int Sensitivity { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
public partial double GyroDeadzone { get; set; }
|
||||
private double _gyroDeadzone;
|
||||
|
||||
public double GyroDeadzone
|
||||
{
|
||||
get => _gyroDeadzone;
|
||||
set
|
||||
{
|
||||
if (_gyroDeadzone != value)
|
||||
{
|
||||
_gyroDeadzone = value;
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(GyroDeadzoneText));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string GyroDeadzoneText
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_gyroDeadzone == 100)
|
||||
{
|
||||
return _gyroDeadzone.ToString("F1", CultureInfo.CurrentCulture);
|
||||
}
|
||||
else
|
||||
{
|
||||
return _gyroDeadzone.ToString("F2", CultureInfo.CurrentCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[ObservableProperty]
|
||||
public partial bool EnableCemuHookMotion { get; set; }
|
||||
|
||||
@@ -1,13 +1,68 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||
{
|
||||
public partial class RumbleInputViewModel : BaseModel
|
||||
{
|
||||
[ObservableProperty]
|
||||
public partial float StrongRumble { get; set; }
|
||||
private float strongRumble;
|
||||
private float weakRumble;
|
||||
|
||||
[ObservableProperty]
|
||||
public partial float WeakRumble { get; set; }
|
||||
public float StrongRumble
|
||||
{
|
||||
get => strongRumble;
|
||||
set
|
||||
{
|
||||
if (strongRumble != value)
|
||||
{
|
||||
strongRumble = value;
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(StrongRumbleText));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public float WeakRumble
|
||||
{
|
||||
get => weakRumble;
|
||||
set
|
||||
{
|
||||
if (weakRumble != value)
|
||||
{
|
||||
weakRumble = value;
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(WeakRumbleText));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string StrongRumbleText
|
||||
{
|
||||
get
|
||||
{
|
||||
if (StrongRumble == 10)
|
||||
{
|
||||
return StrongRumble.ToString("F1", CultureInfo.CurrentCulture);
|
||||
}
|
||||
else
|
||||
{
|
||||
return StrongRumble.ToString("F2", CultureInfo.CurrentCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string WeakRumbleText
|
||||
{
|
||||
get
|
||||
{
|
||||
if (WeakRumble == 10)
|
||||
{
|
||||
return WeakRumble.ToString("F1", CultureInfo.CurrentCulture);
|
||||
}
|
||||
else
|
||||
{
|
||||
return WeakRumble.ToString("F2", CultureInfo.CurrentCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user