add a setup wizard opener in the help dropdown in the menu bar, that also respects CanShowSetupWizard

This commit is contained in:
GreemDev
2025-11-22 23:23:30 -06:00
parent 8ab851ead8
commit c5b325bde2
6 changed files with 43 additions and 9 deletions

View File

@@ -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);

View File

@@ -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");