Initial work on a setup wizard

Setup wizard abstraction & architecture from TKMM
This commit is contained in:
GreemDev 2025-11-21 00:20:15 -06:00
parent 3a593b6084
commit f4f243c261
19 changed files with 743 additions and 10 deletions

View file

@ -0,0 +1,31 @@
using Avalonia.Controls.Presenters;
using Ryujinx.Ava.Common.Locale;
using Ryujinx.Systems.SetupWizard;
using System.Threading.Tasks;
namespace Ryujinx.Ava.Systems.SetupWizard
{
public abstract class BaseSetupWizard(ContentPresenter presenter)
{
/// <summary>
/// Define the logic and flow of this <see cref="BaseSetupWizard"/>.
/// </summary>
public abstract ValueTask Start();
protected ValueTask<bool> FirstPage()
{
SetupWizardPageBuilder builder = new(presenter, isFirstPage: true);
return builder
.WithTitle(LocaleKeys.SetupWizardFirstPageTitle)
.WithContent(LocaleKeys.SetupWizardFirstPageContent)
.WithActionContent(LocaleKeys.SetupWizardFirstPageAction)
.Show();
}
protected SetupWizardPageBuilder NextPage()
{
return new SetupWizardPageBuilder(presenter);
}
}
}