mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-16 22:37:06 +00:00
UI: Add keybinds to useful things
This commit is contained in:
parent
5ea895ed2e
commit
e7e89efb3c
10 changed files with 87 additions and 45 deletions
|
|
@ -9,13 +9,11 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
{
|
||||
public AmiiboWindow(bool showAll, string lastScannedAmiiboId, string titleId)
|
||||
{
|
||||
ViewModel = new AmiiboWindowViewModel(this, lastScannedAmiiboId, titleId)
|
||||
DataContext = ViewModel = new AmiiboWindowViewModel(this, lastScannedAmiiboId, titleId)
|
||||
{
|
||||
ShowAllAmiibo = showAll,
|
||||
};
|
||||
|
||||
DataContext = ViewModel;
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
Title = $"Ryujinx {Program.Version} - " + LocaleManager.Instance[LocaleKeys.Amiibo];
|
||||
|
|
@ -23,9 +21,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
|
||||
public AmiiboWindow()
|
||||
{
|
||||
ViewModel = new AmiiboWindowViewModel(this, string.Empty, string.Empty);
|
||||
|
||||
DataContext = ViewModel;
|
||||
DataContext = ViewModel = new AmiiboWindowViewModel(this, string.Empty, string.Empty);
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
|
|
@ -37,24 +33,10 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
|
||||
public bool IsScanned { get; set; }
|
||||
public AmiiboApi ScannedAmiibo { get; set; }
|
||||
public AmiiboWindowViewModel ViewModel { get; set; }
|
||||
public AmiiboWindowViewModel ViewModel;
|
||||
|
||||
private void ScanButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (ViewModel.AmiiboSelectedIndex > -1)
|
||||
{
|
||||
AmiiboApi amiibo = ViewModel.AmiiboList[ViewModel.AmiiboSelectedIndex];
|
||||
ScannedAmiibo = amiibo;
|
||||
IsScanned = true;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
private void ScanButton_Click(object sender, RoutedEventArgs e) => ViewModel.Scan();
|
||||
|
||||
private void CancelButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
IsScanned = false;
|
||||
|
||||
Close();
|
||||
}
|
||||
private void CancelButton_Click(object sender, RoutedEventArgs e) => ViewModel.Cancel();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue