diff --git a/Ryujinx.Ava/Ui/Controls/GameGridView.axaml b/Ryujinx.Ava/Ui/Controls/GameGridView.axaml index 431bcf00..bcf38e7a 100644 --- a/Ryujinx.Ava/Ui/Controls/GameGridView.axaml +++ b/Ryujinx.Ava/Ui/Controls/GameGridView.axaml @@ -37,7 +37,7 @@ Header="{locale:Locale GameListContextMenuManageTitleUpdates}" ToolTip.Tip="{locale:Locale GameListContextMenuManageTitleUpdatesToolTip}" /> $"{BuildId}-{Name}"; + public string Name { get; } public string CleanName => Name.Substring(1, Name.Length - 8); diff --git a/Ryujinx.Ava/Ui/Models/CheatsList.cs b/Ryujinx.Ava/Ui/Models/CheatsList.cs index f2b0592e..8231e521 100644 --- a/Ryujinx.Ava/Ui/Models/CheatsList.cs +++ b/Ryujinx.Ava/Ui/Models/CheatsList.cs @@ -10,26 +10,13 @@ namespace Ryujinx.Ava.Ui.Models public CheatsList(string buildId, string path) { BuildId = buildId; - Path = path; + Path = path; + CollectionChanged += CheatsList_CollectionChanged; } - private void CheatsList_CollectionChanged(object sender, - NotifyCollectionChangedEventArgs e) - { - if (e.Action == NotifyCollectionChangedAction.Add) - { - (e.NewItems[0] as CheatModel).EnableToggled += Item_EnableToggled; - } - } - - private void Item_EnableToggled(object sender, bool e) - { - OnPropertyChanged(new PropertyChangedEventArgs(nameof(IsEnabled))); - } - public string BuildId { get; } - public string Path { get; } + public string Path { get; } public bool IsEnabled { @@ -47,5 +34,18 @@ namespace Ryujinx.Ava.Ui.Models OnPropertyChanged(new PropertyChangedEventArgs(nameof(IsEnabled))); } } + + private void CheatsList_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) + { + if (e.Action == NotifyCollectionChangedAction.Add) + { + (e.NewItems[0] as CheatModel).EnableToggled += Item_EnableToggled; + } + } + + private void Item_EnableToggled(object sender, bool e) + { + OnPropertyChanged(new PropertyChangedEventArgs(nameof(IsEnabled))); + } } } \ No newline at end of file diff --git a/Ryujinx.Ava/Ui/Models/DlcModel.cs b/Ryujinx.Ava/Ui/Models/DlcModel.cs deleted file mode 100644 index 7e5f4a62..00000000 --- a/Ryujinx.Ava/Ui/Models/DlcModel.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace Ryujinx.Ava.Ui.Models -{ - public class DlcModel - { - public bool IsEnabled { get; set; } - public string TitleId { get; } - public string ContainerPath { get; } - public string FullPath { get; } - - public DlcModel(string titleId, string containerPath, string fullPath, bool isEnabled) - { - TitleId = titleId; - ContainerPath = containerPath; - FullPath = fullPath; - IsEnabled = isEnabled; - } - } -} \ No newline at end of file diff --git a/Ryujinx.Ava/Ui/Models/DownloadableContentModel.cs b/Ryujinx.Ava/Ui/Models/DownloadableContentModel.cs new file mode 100644 index 00000000..67530f62 --- /dev/null +++ b/Ryujinx.Ava/Ui/Models/DownloadableContentModel.cs @@ -0,0 +1,18 @@ +namespace Ryujinx.Ava.Ui.Models +{ + public class DownloadableContentModel + { + public bool Enabled { get; set; } + public string TitleId { get; } + public string ContainerPath { get; } + public string FullPath { get; } + + public DownloadableContentModel(string titleId, string containerPath, string fullPath, bool enabled) + { + TitleId = titleId; + ContainerPath = containerPath; + FullPath = fullPath; + Enabled = enabled; + } + } +} \ No newline at end of file diff --git a/Ryujinx.Ava/Ui/ViewModels/AmiiboWindowViewModel.cs b/Ryujinx.Ava/Ui/ViewModels/AmiiboWindowViewModel.cs index 7015df44..fc809e52 100644 --- a/Ryujinx.Ava/Ui/ViewModels/AmiiboWindowViewModel.cs +++ b/Ryujinx.Ava/Ui/ViewModels/AmiiboWindowViewModel.cs @@ -382,9 +382,9 @@ namespace Ryujinx.Ava.Ui.ViewModels { string amiiboJsonString = await response.Content.ReadAsStringAsync(); - using (FileStream dlcJsonStream = File.Create(_amiiboJsonPath, 4096, FileOptions.WriteThrough)) + using (FileStream amiiboJsonStream = File.Create(_amiiboJsonPath, 4096, FileOptions.WriteThrough)) { - dlcJsonStream.Write(Encoding.UTF8.GetBytes(amiiboJsonString)); + amiiboJsonStream.Write(Encoding.UTF8.GetBytes(amiiboJsonString)); } return amiiboJsonString; diff --git a/Ryujinx.Ava/Ui/ViewModels/MainWindowViewModel.cs b/Ryujinx.Ava/Ui/ViewModels/MainWindowViewModel.cs index 7e6452f9..bd9242e7 100644 --- a/Ryujinx.Ava/Ui/ViewModels/MainWindowViewModel.cs +++ b/Ryujinx.Ava/Ui/ViewModels/MainWindowViewModel.cs @@ -1261,15 +1261,15 @@ namespace Ryujinx.Ava.Ui.ViewModels } } - public async void OpenDlcManager() + public async void OpenDownloadableContentManager() { var selection = SelectedApplication; if (selection != null) { - DlcManagerWindow dlcManager = new(_owner.VirtualFileSystem, ulong.Parse(selection.TitleId, NumberStyles.HexNumber), selection.TitleName); + DownloadableContentManagerWindow downloadableContentManager = new(_owner.VirtualFileSystem, ulong.Parse(selection.TitleId, NumberStyles.HexNumber), selection.TitleName); - await dlcManager.ShowDialog(_owner); + await downloadableContentManager.ShowDialog(_owner); } } diff --git a/Ryujinx.Ava/Ui/Windows/AboutWindow.axaml.cs b/Ryujinx.Ava/Ui/Windows/AboutWindow.axaml.cs index 75e9901b..90b870aa 100644 --- a/Ryujinx.Ava/Ui/Windows/AboutWindow.axaml.cs +++ b/Ryujinx.Ava/Ui/Windows/AboutWindow.axaml.cs @@ -2,7 +2,6 @@ using Avalonia.Controls; using Avalonia.Input; using Avalonia.Interactivity; -using Avalonia.Markup.Xaml; using Avalonia.Threading; using Ryujinx.Ava.Common.Locale; using Ryujinx.Common.Utilities; @@ -27,9 +26,6 @@ namespace Ryujinx.Ava.Ui.Windows DataContext = this; InitializeComponent(); -#if DEBUG - this.AttachDevTools(); -#endif _ = DownloadPatronsJson(); } diff --git a/Ryujinx.Ava/Ui/Windows/AmiiboWindow.axaml.cs b/Ryujinx.Ava/Ui/Windows/AmiiboWindow.axaml.cs index 5ed84571..9333a40e 100644 --- a/Ryujinx.Ava/Ui/Windows/AmiiboWindow.axaml.cs +++ b/Ryujinx.Ava/Ui/Windows/AmiiboWindow.axaml.cs @@ -1,6 +1,5 @@ using Avalonia; using Avalonia.Interactivity; -using Avalonia.Markup.Xaml; using Ryujinx.Ava.Common.Locale; using Ryujinx.Ava.Ui.Models; using Ryujinx.Ava.Ui.ViewModels; @@ -18,9 +17,7 @@ namespace Ryujinx.Ava.Ui.Windows DataContext = ViewModel; InitializeComponent(); -#if DEBUG - this.AttachDevTools(); -#endif + Title = $"Ryujinx {Program.Version} - " + LocaleManager.Instance["Amiibo"]; } @@ -31,9 +28,7 @@ namespace Ryujinx.Ava.Ui.Windows DataContext = ViewModel; InitializeComponent(); -#if DEBUG - this.AttachDevTools(); -#endif + if (Program.PreviewerDetached) { Title = $"Ryujinx {Program.Version} - " + LocaleManager.Instance["Amiibo"]; diff --git a/Ryujinx.Ava/Ui/Windows/CheatWindow.axaml b/Ryujinx.Ava/Ui/Windows/CheatWindow.axaml index a5a4b0ee..8d911611 100644 --- a/Ryujinx.Ava/Ui/Windows/CheatWindow.axaml +++ b/Ryujinx.Ava/Ui/Windows/CheatWindow.axaml @@ -1,21 +1,24 @@ - + - + @@ -24,14 +27,14 @@ + TextAlignment="Center" + TextWrapping="Wrap" /> - + - - - + + + - - - + + + @@ -79,8 +88,8 @@ Name="SaveButton" MinWidth="90" Margin="5" - IsVisible="{Binding !NoCheatsFound}" - Command="{Binding Save}"> + Command="{Binding Save}" + IsVisible="{Binding !NoCheatsFound}">