From a665f92127fcbb165faddf69bdd37ae6c50b2a16 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Mon, 30 Oct 2023 00:42:05 -0400 Subject: [PATCH] initial Layout --- src/Ryujinx.Ava/Assets/Locales/en_US.json | 2 +- .../UI/ViewModels/CheatWindowViewModel.cs | 10 ++ src/Ryujinx.Ava/UI/Windows/CheatWindow.axaml | 106 +++++++++++------- 3 files changed, 75 insertions(+), 43 deletions(-) diff --git a/src/Ryujinx.Ava/Assets/Locales/en_US.json b/src/Ryujinx.Ava/Assets/Locales/en_US.json index c0493c719..75327185a 100644 --- a/src/Ryujinx.Ava/Assets/Locales/en_US.json +++ b/src/Ryujinx.Ava/Assets/Locales/en_US.json @@ -594,7 +594,7 @@ "DlcWindowTitle": "Manage Downloadable Content for {0} ({1})", "UpdateWindowTitle": "Title Update Manager", "CheatWindowHeading": "Manage Cheats for {0} ({1})", - "BuildId": "BuildId:", + "BuildId": "Build ID:", "DlcWindowHeading": "{0} Downloadable Content(s)", "UserProfilesEditProfile": "Edit Selected", "Cancel": "Cancel", diff --git a/src/Ryujinx.Ava/UI/ViewModels/CheatWindowViewModel.cs b/src/Ryujinx.Ava/UI/ViewModels/CheatWindowViewModel.cs index 89b243104..d7de58bb2 100644 --- a/src/Ryujinx.Ava/UI/ViewModels/CheatWindowViewModel.cs +++ b/src/Ryujinx.Ava/UI/ViewModels/CheatWindowViewModel.cs @@ -1,4 +1,6 @@ +using Avalonia; using Avalonia.Collections; +using Avalonia.Controls.ApplicationLifetimes; using Ryujinx.Ava.UI.Models; using Ryujinx.HLE.FileSystem; using Ryujinx.HLE.HOS; @@ -59,6 +61,14 @@ namespace Ryujinx.Ava.UI.ViewModels } } + public async void CopyToClipboard() + { + if (Application.Current.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) + { + await desktop.MainWindow.Clipboard.SetTextAsync(BuildId); + } + } + public void Save() { List enabledCheats = new(); diff --git a/src/Ryujinx.Ava/UI/Windows/CheatWindow.axaml b/src/Ryujinx.Ava/UI/Windows/CheatWindow.axaml index a0290ebe9..f75e8a8bf 100644 --- a/src/Ryujinx.Ava/UI/Windows/CheatWindow.axaml +++ b/src/Ryujinx.Ava/UI/Windows/CheatWindow.axaml @@ -11,50 +11,53 @@ x:DataType="viewModels:CheatWindowViewModel" mc:Ignorable="d" Focusable="True"> - + - - - - - - - - + + + + + + + + + + + + + + BorderBrush="{DynamicResource AppListHoverBackgroundColor}" + BorderThickness="1" + CornerRadius="5" + Padding="2.5"> @@ -77,13 +80,32 @@ - - + + + + + - - + +