mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-27 15:39:14 +00:00
add a setup wizard opener in the help dropdown in the menu bar, that also respects CanShowSetupWizard
This commit is contained in:
@@ -25,7 +25,7 @@ namespace Ryujinx.Ava.UI.SetupWizard
|
||||
public override async Task Start()
|
||||
{
|
||||
NotificationHelper.SetNotificationManager(wizardWindow);
|
||||
RyujinxSetupWizardWindow.IsUsingSetupWizard = true;
|
||||
RyujinxSetupWizardWindow.IsOpen = true;
|
||||
Start:
|
||||
await FirstPage();
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Ryujinx.Ava.UI.SetupWizard
|
||||
Return:
|
||||
NotificationHelper.SetNotificationManager(_mainWindow);
|
||||
wizardWindow.Close();
|
||||
RyujinxSetupWizardWindow.IsUsingSetupWizard = false;
|
||||
RyujinxSetupWizardWindow.IsOpen = false;
|
||||
|
||||
if (_configWasModified)
|
||||
ConfigurationState.Instance.ToFileFormat().SaveConfig(Program.GlobalConfigurationPath);
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Ryujinx.Ava.UI.SetupWizard
|
||||
{
|
||||
public partial class RyujinxSetupWizardWindow : StyleableAppWindow
|
||||
{
|
||||
public static bool IsUsingSetupWizard { get; set; }
|
||||
public static bool IsOpen { get; set; }
|
||||
|
||||
public RyujinxSetupWizardWindow() : base(useCustomTitleBar: true)
|
||||
{
|
||||
@@ -26,6 +26,9 @@ namespace Ryujinx.Ava.UI.SetupWizard
|
||||
|
||||
public static Task ShowAsync(Window owner = null)
|
||||
{
|
||||
if (!CanShowSetupWizard)
|
||||
return Task.CompletedTask;
|
||||
|
||||
Task windowTask = ShowAsync(
|
||||
CreateWindow(out BaseSetupWizard wiz),
|
||||
owner ?? RyujinxApp.MainWindow
|
||||
@@ -49,7 +52,7 @@ namespace Ryujinx.Ava.UI.SetupWizard
|
||||
public static bool DisableSetupWizard()
|
||||
{
|
||||
if (!CanShowSetupWizard)
|
||||
return false; //cannot disable; file already doesn't exist, so it's disabled.
|
||||
return false; //cannot disable; file exists, so it's already disabled.
|
||||
|
||||
string disableFile = Path.Combine(AppDataManager.BaseDirPath, ".DoNotShowSetupWizard");
|
||||
|
||||
@@ -69,7 +72,7 @@ namespace Ryujinx.Ava.UI.SetupWizard
|
||||
public static bool EnableSetupWizard()
|
||||
{
|
||||
if (CanShowSetupWizard)
|
||||
return false; //cannot enable; file already exists, so it's enabled.
|
||||
return false; //cannot enable; file does not exist, so it's already enabled.
|
||||
|
||||
string disableFile = Path.Combine(AppDataManager.BaseDirPath, ".DoNotShowSetupWizard");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user