Setup Wizard restructuring

- Remove polymorphic base, this only existed because TKMM has a desktop/switch setup prodecure difference and has 2 implementations of the setup wizard. We only need one.
- Remove Systems/UI file split, they're all in Ryujinx.Ava.UI now
- made NotificationHelper instance-based to allow you to encapsulate notifications to a window that magically disappear when the window is closed, instead of switching to showing on the main window.
This commit is contained in:
GreemDev
2025-11-24 03:45:19 -06:00
parent 133ac41425
commit dc2aa837b3
18 changed files with 123 additions and 84 deletions

View File

@@ -1,6 +1,5 @@
using Ryujinx.Ava.Common.Locale;
using Ryujinx.Ava.Systems.Configuration;
using Ryujinx.Ava.Systems.SetupWizard;
using Ryujinx.Ava.UI.Helpers;
using Ryujinx.Ava.UI.SetupWizard.Pages;
using Ryujinx.Ava.UI.Windows;
@@ -9,17 +8,18 @@ using System.Threading.Tasks;
namespace Ryujinx.Ava.UI.SetupWizard
{
public class RyujinxSetupWizard(RyujinxSetupWizardWindow wizardWindow)
: BaseSetupWizard(wizardWindow.WizardPresenter)
{
private readonly MainWindow _mainWindow = RyujinxApp.MainWindow;
private bool _configWasModified;
public bool HasFirmware => _mainWindow.ContentManager.GetCurrentFirmwareVersion() != null;
public NotificationHelper NotificationHelper { get; private set; }
public override async Task Start()
public async Task Start()
{
NotificationHelper.SetNotificationManager(wizardWindow);
NotificationHelper = new NotificationHelper(wizardWindow);
RyujinxSetupWizardWindow.IsOpen = true;
Start:
await FirstPage()
@@ -39,7 +39,7 @@ namespace Ryujinx.Ava.UI.SetupWizard
goto Keys;
Return:
NotificationHelper.SetNotificationManager(_mainWindow);
NotificationHelper = null;
wizardWindow.Close();
RyujinxSetupWizardWindow.IsOpen = false;
@@ -93,6 +93,10 @@ namespace Ryujinx.Ava.UI.SetupWizard
return true;
}
private SetupWizardPage FirstPage() => new(wizardWindow.WizardPresenter, this, isFirstPage: true);
private SetupWizardPage NextPage() => new(wizardWindow.WizardPresenter, this);
public void SignalConfigModified()
{
_configWasModified = true;