mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-10 04:39:11 +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()
|
||||
{
|
||||
await MotionInputView.Show(this);
|
||||
|
@ -62,10 +64,17 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||
|
||||
public ControllerInputViewModel(InputViewModel model, ControllerInputConfig config)
|
||||
{
|
||||
IsLeft = model.IsLeft;
|
||||
IsRight = model.IsRight;
|
||||
Image = model.Image;
|
||||
parentModel = model;
|
||||
model.NotifyChangesEvent += UpdateParentModelValues;
|
||||
UpdateParentModelValues();
|
||||
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 IsModified { get; set; }
|
||||
public event Action NotifyChangesEvent;
|
||||
|
||||
public object ConfigViewModel
|
||||
{
|
||||
|
@ -873,6 +874,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||
OnPropertyChanged(nameof(IsKeyboard));
|
||||
OnPropertyChanged(nameof(IsRight));
|
||||
OnPropertyChanged(nameof(IsLeft));
|
||||
NotifyChangesEvent?.Invoke();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
|
|
@ -49,12 +49,21 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||
}
|
||||
}
|
||||
|
||||
public InputViewModel parentModel;
|
||||
|
||||
public KeyboardInputViewModel(InputViewModel model, KeyboardInputConfig config)
|
||||
{
|
||||
IsLeft = model.IsLeft;
|
||||
IsRight = model.IsRight;
|
||||
Image = model.Image;
|
||||
parentModel = model;
|
||||
model.NotifyChangesEvent += UpdateParentModelValues;
|
||||
UpdateParentModelValues();
|
||||
Config = config;
|
||||
}
|
||||
|
||||
public void UpdateParentModelValues()
|
||||
{
|
||||
IsLeft = parentModel.IsLeft;
|
||||
IsRight = parentModel.IsRight;
|
||||
Image = parentModel.Image;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue