aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Ava/Ui/ViewModels/ControllerSettingsViewModel.cs
diff options
context:
space:
mode:
authorEmmanuel Hansen <emmausssss@gmail.com>2022-07-24 17:38:38 +0000
committerGitHub <noreply@github.com>2022-07-24 14:38:38 -0300
commit6e02cac952f1a9a34d2777199dde657eba0784e6 (patch)
treebfdf6ebc5c5fb062910ffb2feaec56e1240c0596 /Ryujinx.Ava/Ui/ViewModels/ControllerSettingsViewModel.cs
parent3a3380fa2578bf1731c6cd7cebdca7b7cc5681b0 (diff)
Avalonia - Use content dialog for user profile manager (#3455)1.1.187
* remove content dialog placeholder from all windows * remove redundant window argument * redesign user profile window * wip * use avalonia auto name generator * add edit and new user options * move profile image selection to content dialog * remove usings * fix updater * address review * adjust avatar dialog size * add validation for user editor * fix typo * Shorten some labels
Diffstat (limited to 'Ryujinx.Ava/Ui/ViewModels/ControllerSettingsViewModel.cs')
-rw-r--r--Ryujinx.Ava/Ui/ViewModels/ControllerSettingsViewModel.cs13
1 files changed, 6 insertions, 7 deletions
diff --git a/Ryujinx.Ava/Ui/ViewModels/ControllerSettingsViewModel.cs b/Ryujinx.Ava/Ui/ViewModels/ControllerSettingsViewModel.cs
index c570aa8d..a3abdd3b 100644
--- a/Ryujinx.Ava/Ui/ViewModels/ControllerSettingsViewModel.cs
+++ b/Ryujinx.Ava/Ui/ViewModels/ControllerSettingsViewModel.cs
@@ -327,12 +327,12 @@ namespace Ryujinx.Ava.Ui.ViewModels
public async void ShowMotionConfig()
{
- await MotionSettingsWindow.Show(this, _owner.GetVisualRoot() as StyleableWindow);
+ await MotionSettingsWindow.Show(this);
}
public async void ShowRumbleConfig()
{
- await RumbleSettingsWindow.Show(this, _owner.GetVisualRoot() as StyleableWindow);
+ await RumbleSettingsWindow.Show(this);
}
private void LoadInputDriver()
@@ -701,8 +701,8 @@ namespace Ryujinx.Ava.Ui.ViewModels
catch (InvalidOperationException)
{
Logger.Error?.Print(LogClass.Configuration, $"Profile {ProfileName} is incompatible with the current input configuration system.");
- await ContentDialogHelper.CreateErrorDialog(_owner.GetVisualRoot() as StyleableWindow,
- String.Format(LocaleManager.Instance["DialogProfileInvalidProfileErrorMessage"], ProfileName));
+
+ await ContentDialogHelper.CreateErrorDialog(string.Format(LocaleManager.Instance["DialogProfileInvalidProfileErrorMessage"], ProfileName));
return;
}
@@ -736,7 +736,7 @@ namespace Ryujinx.Ava.Ui.ViewModels
if (ProfileName == LocaleManager.Instance["ControllerSettingsProfileDefault"])
{
- await ContentDialogHelper.CreateErrorDialog(_owner.GetVisualRoot() as StyleableWindow, LocaleManager.Instance["DialogProfileDefaultProfileOverwriteErrorMessage"]);
+ await ContentDialogHelper.CreateErrorDialog(LocaleManager.Instance["DialogProfileDefaultProfileOverwriteErrorMessage"]);
return;
}
@@ -769,7 +769,7 @@ namespace Ryujinx.Ava.Ui.ViewModels
}
else
{
- await ContentDialogHelper.CreateErrorDialog(_owner.GetVisualRoot() as StyleableWindow, LocaleManager.Instance["DialogProfileInvalidProfileNameErrorMessage"]);
+ await ContentDialogHelper.CreateErrorDialog(LocaleManager.Instance["DialogProfileInvalidProfileNameErrorMessage"]);
}
}
}
@@ -782,7 +782,6 @@ namespace Ryujinx.Ava.Ui.ViewModels
}
UserResult result = await ContentDialogHelper.CreateConfirmationDialog(
- _owner.GetVisualRoot() as StyleableWindow,
LocaleManager.Instance["DialogProfileDeleteProfileTitle"],
LocaleManager.Instance["DialogProfileDeleteProfileMessage"],
LocaleManager.Instance["InputDialogYes"],