mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-27 02:53:04 +00:00
Move dialogues
This commit is contained in:
parent
b041fd837c
commit
486a352de2
4 changed files with 29 additions and 12 deletions
|
@ -74,17 +74,6 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
{
|
{
|
||||||
_graphicsBackendMultithreadingIndex = value;
|
_graphicsBackendMultithreadingIndex = value;
|
||||||
|
|
||||||
if (_graphicsBackendMultithreadingIndex != (int)ConfigurationState.Instance.Graphics.BackendThreading.Value)
|
|
||||||
{
|
|
||||||
Dispatcher.UIThread.InvokeAsync(() =>
|
|
||||||
ContentDialogHelper.CreateInfoDialog(LocaleManager.Instance[LocaleKeys.DialogSettingsBackendThreadingWarningMessage],
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
LocaleManager.Instance[LocaleKeys.InputDialogOk],
|
|
||||||
LocaleManager.Instance[LocaleKeys.DialogSettingsBackendThreadingWarningTitle])
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
OnPropertyChanged();
|
OnPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,8 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||||
LocaleManager.Instance[LocaleKeys.DialogControllerSettingsModifiedConfirmSubMessage],
|
LocaleManager.Instance[LocaleKeys.DialogControllerSettingsModifiedConfirmSubMessage],
|
||||||
LocaleManager.Instance[LocaleKeys.InputDialogYes],
|
LocaleManager.Instance[LocaleKeys.InputDialogYes],
|
||||||
LocaleManager.Instance[LocaleKeys.InputDialogNo],
|
LocaleManager.Instance[LocaleKeys.InputDialogNo],
|
||||||
LocaleManager.Instance[LocaleKeys.RyujinxConfirm]);
|
LocaleManager.Instance[LocaleKeys.RyujinxConfirm],
|
||||||
|
parent: (Window)this.VisualRoot);
|
||||||
|
|
||||||
if (result == UserResult.Yes)
|
if (result == UserResult.Yes)
|
||||||
{
|
{
|
||||||
|
|
|
@ -265,6 +265,7 @@
|
||||||
<ComboBox Width="350"
|
<ComboBox Width="350"
|
||||||
HorizontalContentAlignment="Left"
|
HorizontalContentAlignment="Left"
|
||||||
ToolTip.Tip="{locale:Locale GalThreadingTooltip}"
|
ToolTip.Tip="{locale:Locale GalThreadingTooltip}"
|
||||||
|
SelectionChanged="GraphicsBackendMultithreadingIndex_OnSelectionChanged"
|
||||||
SelectedIndex="{Binding GraphicsBackendMultithreadingIndex}">
|
SelectedIndex="{Binding GraphicsBackendMultithreadingIndex}">
|
||||||
<ComboBoxItem>
|
<ComboBoxItem>
|
||||||
<TextBlock Text="{locale:Locale CommonAuto}" />
|
<TextBlock Text="{locale:Locale CommonAuto}" />
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Threading;
|
||||||
|
using Ryujinx.Ava.Common.Locale;
|
||||||
|
using Ryujinx.Ava.UI.Helpers;
|
||||||
|
using Ryujinx.Common.Logging;
|
||||||
|
using Ryujinx.UI.Common.Configuration;
|
||||||
|
using Logger = Ryujinx.Common.Logging.Logger;
|
||||||
|
|
||||||
namespace Ryujinx.Ava.UI.Views.Settings
|
namespace Ryujinx.Ava.UI.Views.Settings
|
||||||
{
|
{
|
||||||
|
@ -8,5 +14,25 @@ namespace Ryujinx.Ava.UI.Views.Settings
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void GraphicsBackendMultithreadingIndex_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.Source is not ComboBox comboBox)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (comboBox.SelectedIndex != (int)ConfigurationState.Instance.Graphics.BackendThreading.Value && comboBox.SelectedIndex >= 0)
|
||||||
|
{
|
||||||
|
Dispatcher.UIThread.InvokeAsync(() =>
|
||||||
|
ContentDialogHelper.CreateInfoDialog(LocaleManager.Instance[LocaleKeys.DialogSettingsBackendThreadingWarningMessage],
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
LocaleManager.Instance[LocaleKeys.InputDialogOk],
|
||||||
|
LocaleManager.Instance[LocaleKeys.DialogSettingsBackendThreadingWarningTitle],
|
||||||
|
parent: this.VisualRoot as Window)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue