mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-10 12:49:13 +00:00
Progress
This commit is contained in:
parent
d224996c15
commit
d738da55a7
3 changed files with 26 additions and 6 deletions
|
@ -50,6 +50,8 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public InputViewModel parentModel;
|
||||||
|
|
||||||
public async void ShowMotionConfig()
|
public async void ShowMotionConfig()
|
||||||
{
|
{
|
||||||
await MotionInputView.Show(this);
|
await MotionInputView.Show(this);
|
||||||
|
@ -62,10 +64,17 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||||
|
|
||||||
public ControllerInputViewModel(InputViewModel model, ControllerInputConfig config)
|
public ControllerInputViewModel(InputViewModel model, ControllerInputConfig config)
|
||||||
{
|
{
|
||||||
IsLeft = model.IsLeft;
|
parentModel = model;
|
||||||
IsRight = model.IsRight;
|
model.NotifyChangesEvent += UpdateParentModelValues;
|
||||||
Image = model.Image;
|
UpdateParentModelValues();
|
||||||
Config = config;
|
Config = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void UpdateParentModelValues()
|
||||||
|
{
|
||||||
|
IsLeft = parentModel.IsLeft;
|
||||||
|
IsRight = parentModel.IsRight;
|
||||||
|
Image = parentModel.Image;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -71,6 +71,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||||
public bool IsLeft { get; set; }
|
public bool IsLeft { get; set; }
|
||||||
|
|
||||||
public bool IsModified { get; set; }
|
public bool IsModified { get; set; }
|
||||||
|
public event Action NotifyChangesEvent;
|
||||||
|
|
||||||
public object ConfigViewModel
|
public object ConfigViewModel
|
||||||
{
|
{
|
||||||
|
@ -873,6 +874,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||||
OnPropertyChanged(nameof(IsKeyboard));
|
OnPropertyChanged(nameof(IsKeyboard));
|
||||||
OnPropertyChanged(nameof(IsRight));
|
OnPropertyChanged(nameof(IsRight));
|
||||||
OnPropertyChanged(nameof(IsLeft));
|
OnPropertyChanged(nameof(IsLeft));
|
||||||
|
NotifyChangesEvent?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
|
|
|
@ -49,12 +49,21 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public InputViewModel parentModel;
|
||||||
|
|
||||||
public KeyboardInputViewModel(InputViewModel model, KeyboardInputConfig config)
|
public KeyboardInputViewModel(InputViewModel model, KeyboardInputConfig config)
|
||||||
{
|
{
|
||||||
IsLeft = model.IsLeft;
|
parentModel = model;
|
||||||
IsRight = model.IsRight;
|
model.NotifyChangesEvent += UpdateParentModelValues;
|
||||||
Image = model.Image;
|
UpdateParentModelValues();
|
||||||
Config = config;
|
Config = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void UpdateParentModelValues()
|
||||||
|
{
|
||||||
|
IsLeft = parentModel.IsLeft;
|
||||||
|
IsRight = parentModel.IsRight;
|
||||||
|
Image = parentModel.Image;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue