diff options
| author | Isaac Marovitz <42140194+IsaacMarovitz@users.noreply.github.com> | 2023-05-22 00:16:20 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-22 01:16:20 +0200 |
| commit | b53e7ffd46b5c4ac5c4ac3dcc24385b2c9dc4fa4 (patch) | |
| tree | e2579164c7c81ab47413d30663224fbbd75e024b /src/Ryujinx.Ava/UI/ViewModels | |
| parent | ac66643346df76561ff85be741e2998290d43646 (diff) | |
Ava UI: Input Menu Redesign (#4990)
* Cleanup
* Remove redundant locales
* Start SVG Fixes…
Better +/- buttons
Fix the grips
Bumpers
Better directional pad
More SVG stuff
Grip adjustments
Final stuff
* Make image bigger
* Border radius
* More cleanup
* Restructure
* Restructure Rumble View
* Use compiled bindings where possible
* Round those pesky corners
* Ack Suggestions
* More suggestions
* Update src/Ryujinx.Ava/UI/Views/Input/RumbleInputView.axaml.cs
Co-authored-by: Ac_K <Acoustik666@gmail.com>
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Diffstat (limited to 'src/Ryujinx.Ava/UI/ViewModels')
| -rw-r--r-- | src/Ryujinx.Ava/UI/ViewModels/ControllerInputViewModel.cs (renamed from src/Ryujinx.Ava/UI/ViewModels/ControllerSettingsViewModel.cs) | 11 | ||||
| -rw-r--r-- | src/Ryujinx.Ava/UI/ViewModels/MotionInputViewModel.cs | 93 | ||||
| -rw-r--r-- | src/Ryujinx.Ava/UI/ViewModels/RumbleInputViewModel.cs | 27 |
3 files changed, 126 insertions, 5 deletions
diff --git a/src/Ryujinx.Ava/UI/ViewModels/ControllerSettingsViewModel.cs b/src/Ryujinx.Ava/UI/ViewModels/ControllerInputViewModel.cs index dd261b10..fda58504 100644 --- a/src/Ryujinx.Ava/UI/ViewModels/ControllerSettingsViewModel.cs +++ b/src/Ryujinx.Ava/UI/ViewModels/ControllerInputViewModel.cs @@ -7,6 +7,7 @@ using Ryujinx.Ava.Common.Locale; using Ryujinx.Ava.Input; using Ryujinx.Ava.UI.Helpers; using Ryujinx.Ava.UI.Models; +using Ryujinx.Ava.UI.Views.Input; using Ryujinx.Ava.UI.Windows; using Ryujinx.Common; using Ryujinx.Common.Configuration; @@ -30,7 +31,7 @@ using Key = Ryujinx.Common.Configuration.Hid.Key; namespace Ryujinx.Ava.UI.ViewModels { - public class ControllerSettingsViewModel : BaseModel, IDisposable + public class ControllerInputViewModel : BaseModel, IDisposable { private const string Disabled = "disabled"; private const string ProControllerResource = "Ryujinx.Ui.Common/Resources/Controller_ProCon.svg"; @@ -231,7 +232,7 @@ namespace Ryujinx.Ava.UI.ViewModels public InputConfig Config { get; set; } - public ControllerSettingsViewModel(UserControl owner) : this() + public ControllerInputViewModel(UserControl owner) : this() { _owner = owner; @@ -258,7 +259,7 @@ namespace Ryujinx.Ava.UI.ViewModels } } - public ControllerSettingsViewModel() + public ControllerInputViewModel() { PlayerIndexes = new ObservableCollection<PlayerModel>(); Controllers = new ObservableCollection<ControllerModel>(); @@ -328,12 +329,12 @@ namespace Ryujinx.Ava.UI.ViewModels public async void ShowMotionConfig() { - await MotionSettingsWindow.Show(this); + await MotionInputView.Show(this); } public async void ShowRumbleConfig() { - await RumbleSettingsWindow.Show(this); + await RumbleInputView.Show(this); } private void LoadInputDriver() diff --git a/src/Ryujinx.Ava/UI/ViewModels/MotionInputViewModel.cs b/src/Ryujinx.Ava/UI/ViewModels/MotionInputViewModel.cs new file mode 100644 index 00000000..d57ccc6b --- /dev/null +++ b/src/Ryujinx.Ava/UI/ViewModels/MotionInputViewModel.cs @@ -0,0 +1,93 @@ +namespace Ryujinx.Ava.UI.ViewModels +{ + public class MotionInputViewModel : BaseModel + { + private int _slot; + public int Slot + { + get => _slot; + set + { + _slot = value; + OnPropertyChanged(); + } + } + + private int _altSlot; + public int AltSlot + { + get => _altSlot; + set + { + _altSlot = value; + OnPropertyChanged(); + } + } + + private string _dsuServerHost; + public string DsuServerHost + { + get => _dsuServerHost; + set + { + _dsuServerHost = value; + OnPropertyChanged(); + } + } + + private int _dsuServerPort; + public int DsuServerPort + { + get => _dsuServerPort; + set + { + _dsuServerPort = value; + OnPropertyChanged(); + } + } + + private bool _mirrorInput; + public bool MirrorInput + { + get => _mirrorInput; + set + { + _mirrorInput = value; + OnPropertyChanged(); + } + } + + private int _sensitivity; + public int Sensitivity + { + get => _sensitivity; + set + { + _sensitivity = value; + OnPropertyChanged(); + } + } + + private double _gryoDeadzone; + public double GyroDeadzone + { + get => _gryoDeadzone; + set + { + _gryoDeadzone = value; + OnPropertyChanged(); + } + } + + private bool _enableCemuHookMotion; + public bool EnableCemuHookMotion + { + get => _enableCemuHookMotion; + set + { + _enableCemuHookMotion = value; + OnPropertyChanged(); + } + } + } +}
\ No newline at end of file diff --git a/src/Ryujinx.Ava/UI/ViewModels/RumbleInputViewModel.cs b/src/Ryujinx.Ava/UI/ViewModels/RumbleInputViewModel.cs new file mode 100644 index 00000000..2d53968f --- /dev/null +++ b/src/Ryujinx.Ava/UI/ViewModels/RumbleInputViewModel.cs @@ -0,0 +1,27 @@ +namespace Ryujinx.Ava.UI.ViewModels +{ + public class RumbleInputViewModel : BaseModel + { + private float _strongRumble; + public float StrongRumble + { + get => _strongRumble; + set + { + _strongRumble = value; + OnPropertyChanged(); + } + } + + private float _weakRumble; + public float WeakRumble + { + get => _weakRumble; + set + { + _weakRumble = value; + OnPropertyChanged(); + } + } + } +}
\ No newline at end of file |
