mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-26 06:59:15 +00:00
@@ -3,11 +3,11 @@ using Avalonia.Threading;
|
||||
using FluentAvalonia.UI.Controls;
|
||||
using Gommon;
|
||||
using Ryujinx.Ava.Common.Locale;
|
||||
using Ryujinx.Ava.Systems.Configuration;
|
||||
using Ryujinx.Ava.UI.Controls;
|
||||
using Ryujinx.Ava.UI.Helpers;
|
||||
using Ryujinx.Ava.UI.ViewModels;
|
||||
using Ryujinx.Ava.UI.Windows;
|
||||
using Ryujinx.Ava.Systems.Configuration;
|
||||
using Ryujinx.Common;
|
||||
using Ryujinx.HLE;
|
||||
using Ryujinx.HLE.HOS.Applets;
|
||||
@@ -179,11 +179,13 @@ namespace Ryujinx.Ava.UI.Applet
|
||||
try
|
||||
{
|
||||
_parent.ViewModel.AppHost.NpadManager.BlockInputUpdates();
|
||||
SoftwareKeyboardUIArgs args = new();
|
||||
args.KeyboardMode = KeyboardMode.Default;
|
||||
args.InitialText = "Ryujinx";
|
||||
args.StringLengthMin = 1;
|
||||
args.StringLengthMax = 25;
|
||||
SoftwareKeyboardUIArgs args = new()
|
||||
{
|
||||
KeyboardMode = KeyboardMode.Default,
|
||||
InitialText = "Ryujinx",
|
||||
StringLengthMin = 1,
|
||||
StringLengthMax = 25
|
||||
};
|
||||
(UserResult result, string userInput) =
|
||||
await SwkbdAppletDialog.ShowInputDialog(LocaleManager.Instance[LocaleKeys.CabinetDialog], args);
|
||||
if (result == UserResult.Ok)
|
||||
@@ -220,7 +222,6 @@ namespace Ryujinx.Ava.UI.Applet
|
||||
dialogCloseEvent.WaitOne();
|
||||
}
|
||||
|
||||
|
||||
public void ExecuteProgram(Switch device, ProgramSpecifyKind kind, ulong value)
|
||||
{
|
||||
device.Configuration.UserChannelPersistence.ExecuteProgram(kind, value);
|
||||
@@ -240,7 +241,9 @@ namespace Ryujinx.Ava.UI.Applet
|
||||
{
|
||||
ErrorAppletWindow msgDialog = new(_parent, buttons, message)
|
||||
{
|
||||
Title = title, WindowStartupLocation = WindowStartupLocation.CenterScreen, Width = 400
|
||||
Title = title,
|
||||
WindowStartupLocation = WindowStartupLocation.CenterScreen,
|
||||
Width = 400
|
||||
};
|
||||
|
||||
object response = await msgDialog.Run();
|
||||
@@ -291,7 +294,8 @@ namespace Ryujinx.Ava.UI.Applet
|
||||
profiles.Add(new Models.UserProfile(guest, nav));
|
||||
ProfileSelectorDialogViewModel viewModel = new()
|
||||
{
|
||||
Profiles = profiles, SelectedUserId = _parent.AccountManager.LastOpenedUser.UserId
|
||||
Profiles = profiles,
|
||||
SelectedUserId = _parent.AccountManager.LastOpenedUser.UserId
|
||||
};
|
||||
(selected, _) = await ProfileSelectorDialog.ShowInputDialog(viewModel);
|
||||
|
||||
|
||||
@@ -21,10 +21,10 @@ namespace Ryujinx.Ava.UI.Applet
|
||||
public ProfileSelectorDialog(ProfileSelectorDialogViewModel viewModel)
|
||||
{
|
||||
DataContext = ViewModel = viewModel;
|
||||
|
||||
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
|
||||
private void Grid_PointerEntered(object sender, PointerEventArgs e)
|
||||
{
|
||||
if (sender is Grid { DataContext: UserProfile profile })
|
||||
@@ -61,7 +61,7 @@ namespace Ryujinx.Ava.UI.Applet
|
||||
if (item is UserProfile originalItem)
|
||||
{
|
||||
UserProfileSft profile = new(originalItem.UserId, originalItem.Name, originalItem.Image);
|
||||
|
||||
|
||||
if (profile.UserId == ViewModel.SelectedUserId)
|
||||
{
|
||||
profile.AccountState = AccountState.Open;
|
||||
@@ -98,13 +98,13 @@ namespace Ryujinx.Ava.UI.Applet
|
||||
|
||||
UserId result = UserId.Null;
|
||||
bool input = false;
|
||||
|
||||
|
||||
contentDialog.Closed += Handler;
|
||||
|
||||
await ContentDialogHelper.ShowAsync(contentDialog);
|
||||
|
||||
return (result, input);
|
||||
|
||||
|
||||
void Handler(ContentDialog sender, ContentDialogClosedEventArgs eventArgs)
|
||||
{
|
||||
if (eventArgs.Result == ContentDialogResult.Primary)
|
||||
|
||||
Reference in New Issue
Block a user