mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-12-22 07:37:05 +00:00
Initial work on a setup wizard
Setup wizard abstraction & architecture from TKMM
This commit is contained in:
parent
3a593b6084
commit
f4f243c261
19 changed files with 743 additions and 10 deletions
31
src/Ryujinx/Systems/SetupWizard/BaseSetupWizard.cs
Normal file
31
src/Ryujinx/Systems/SetupWizard/BaseSetupWizard.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue