mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-12-12 07:36:59 +00:00
add a setup wizard opener in the help dropdown in the menu bar, that also respects CanShowSetupWizard
This commit is contained in:
parent
c4873ca06b
commit
3a0f92fbe5
6 changed files with 43 additions and 9 deletions
|
|
@ -24842,6 +24842,31 @@
|
||||||
"zh_TW": "你只能加入與 LDN 網路密碼片語 (passphrase) 設定相同的遊戲。"
|
"zh_TW": "你只能加入與 LDN 網路密碼片語 (passphrase) 設定相同的遊戲。"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"ID": "SetupWizardOpen",
|
||||||
|
"Translations": {
|
||||||
|
"ar_SA": "",
|
||||||
|
"de_DE": "",
|
||||||
|
"el_GR": "",
|
||||||
|
"en_US": "Setup Wizard",
|
||||||
|
"es_ES": "",
|
||||||
|
"fr_FR": "",
|
||||||
|
"he_IL": "",
|
||||||
|
"it_IT": "",
|
||||||
|
"ja_JP": "",
|
||||||
|
"ko_KR": "",
|
||||||
|
"no_NO": "",
|
||||||
|
"pl_PL": "",
|
||||||
|
"pt_BR": "",
|
||||||
|
"ru_RU": "",
|
||||||
|
"sv_SE": "",
|
||||||
|
"th_TH": "",
|
||||||
|
"tr_TR": "",
|
||||||
|
"uk_UA": "",
|
||||||
|
"zh_CN": "",
|
||||||
|
"zh_TW": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"ID": "SetupWizardActionBack",
|
"ID": "SetupWizardActionBack",
|
||||||
"Translations": {
|
"Translations": {
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ namespace Ryujinx.Ava.UI.SetupWizard
|
||||||
public override async Task Start()
|
public override async Task Start()
|
||||||
{
|
{
|
||||||
NotificationHelper.SetNotificationManager(wizardWindow);
|
NotificationHelper.SetNotificationManager(wizardWindow);
|
||||||
RyujinxSetupWizardWindow.IsUsingSetupWizard = true;
|
RyujinxSetupWizardWindow.IsOpen = true;
|
||||||
Start:
|
Start:
|
||||||
await FirstPage();
|
await FirstPage();
|
||||||
|
|
||||||
|
|
@ -40,7 +40,7 @@ namespace Ryujinx.Ava.UI.SetupWizard
|
||||||
Return:
|
Return:
|
||||||
NotificationHelper.SetNotificationManager(_mainWindow);
|
NotificationHelper.SetNotificationManager(_mainWindow);
|
||||||
wizardWindow.Close();
|
wizardWindow.Close();
|
||||||
RyujinxSetupWizardWindow.IsUsingSetupWizard = false;
|
RyujinxSetupWizardWindow.IsOpen = false;
|
||||||
|
|
||||||
if (_configWasModified)
|
if (_configWasModified)
|
||||||
ConfigurationState.Instance.ToFileFormat().SaveConfig(Program.GlobalConfigurationPath);
|
ConfigurationState.Instance.ToFileFormat().SaveConfig(Program.GlobalConfigurationPath);
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ namespace Ryujinx.Ava.UI.SetupWizard
|
||||||
{
|
{
|
||||||
public partial class RyujinxSetupWizardWindow : StyleableAppWindow
|
public partial class RyujinxSetupWizardWindow : StyleableAppWindow
|
||||||
{
|
{
|
||||||
public static bool IsUsingSetupWizard { get; set; }
|
public static bool IsOpen { get; set; }
|
||||||
|
|
||||||
public RyujinxSetupWizardWindow() : base(useCustomTitleBar: true)
|
public RyujinxSetupWizardWindow() : base(useCustomTitleBar: true)
|
||||||
{
|
{
|
||||||
|
|
@ -26,6 +26,9 @@ namespace Ryujinx.Ava.UI.SetupWizard
|
||||||
|
|
||||||
public static Task ShowAsync(Window owner = null)
|
public static Task ShowAsync(Window owner = null)
|
||||||
{
|
{
|
||||||
|
if (!CanShowSetupWizard)
|
||||||
|
return Task.CompletedTask;
|
||||||
|
|
||||||
Task windowTask = ShowAsync(
|
Task windowTask = ShowAsync(
|
||||||
CreateWindow(out BaseSetupWizard wiz),
|
CreateWindow(out BaseSetupWizard wiz),
|
||||||
owner ?? RyujinxApp.MainWindow
|
owner ?? RyujinxApp.MainWindow
|
||||||
|
|
@ -49,7 +52,7 @@ namespace Ryujinx.Ava.UI.SetupWizard
|
||||||
public static bool DisableSetupWizard()
|
public static bool DisableSetupWizard()
|
||||||
{
|
{
|
||||||
if (!CanShowSetupWizard)
|
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");
|
string disableFile = Path.Combine(AppDataManager.BaseDirPath, ".DoNotShowSetupWizard");
|
||||||
|
|
||||||
|
|
@ -69,7 +72,7 @@ namespace Ryujinx.Ava.UI.SetupWizard
|
||||||
public static bool EnableSetupWizard()
|
public static bool EnableSetupWizard()
|
||||||
{
|
{
|
||||||
if (CanShowSetupWizard)
|
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");
|
string disableFile = Path.Combine(AppDataManager.BaseDirPath, ".DoNotShowSetupWizard");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
||||||
xmlns:controls="clr-namespace:Ryujinx.Ava.UI.Controls"
|
xmlns:controls="clr-namespace:Ryujinx.Ava.UI.Controls"
|
||||||
xmlns:common="clr-namespace:Ryujinx.Common;assembly=Ryujinx.Common"
|
xmlns:common="clr-namespace:Ryujinx.Common;assembly=Ryujinx.Common"
|
||||||
|
xmlns:setupWizard="clr-namespace:Ryujinx.Ava.UI.SetupWizard"
|
||||||
x:DataType="viewModels:MainWindowViewModel"
|
x:DataType="viewModels:MainWindowViewModel"
|
||||||
x:Class="Ryujinx.Ava.UI.Views.Main.MainMenuBarView">
|
x:Class="Ryujinx.Ava.UI.Views.Main.MainMenuBarView">
|
||||||
<Design.DataContext>
|
<Design.DataContext>
|
||||||
|
|
@ -244,6 +245,11 @@
|
||||||
Header="{ext:Locale LdnGameListOpen}"
|
Header="{ext:Locale LdnGameListOpen}"
|
||||||
Icon="{ext:Icon fa-solid fa-people-group}"
|
Icon="{ext:Icon fa-solid fa-people-group}"
|
||||||
IsEnabled="{Binding IsRyuLdnEnabled}"/>
|
IsEnabled="{Binding IsRyuLdnEnabled}"/>
|
||||||
|
<MenuItem
|
||||||
|
Name="SetupWizardMenuItem"
|
||||||
|
Header="{ext:Locale SetupWizardOpen}"
|
||||||
|
Icon="{ext:Icon fa-solid fa-wand-sparkles}"
|
||||||
|
IsEnabled="{x:Static setupWizard:RyujinxSetupWizardWindow.CanShowSetupWizard}"/>
|
||||||
<Separator />
|
<Separator />
|
||||||
<MenuItem VerticalAlignment="Center" Header="{ext:Locale MenuBarHelpFaqAndGuides}" Icon="{ext:Icon fa-solid fa-question}" >
|
<MenuItem VerticalAlignment="Center" Header="{ext:Locale MenuBarHelpFaqAndGuides}" Icon="{ext:Icon fa-solid fa-question}" >
|
||||||
<MenuItem
|
<MenuItem
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ using Ryujinx.Ava.Systems.AppLibrary;
|
||||||
using Ryujinx.Ava.Systems.Configuration;
|
using Ryujinx.Ava.Systems.Configuration;
|
||||||
using Ryujinx.Ava.UI.Controls;
|
using Ryujinx.Ava.UI.Controls;
|
||||||
using Ryujinx.Ava.UI.Helpers;
|
using Ryujinx.Ava.UI.Helpers;
|
||||||
|
using Ryujinx.Ava.UI.SetupWizard;
|
||||||
using Ryujinx.Ava.UI.ViewModels;
|
using Ryujinx.Ava.UI.ViewModels;
|
||||||
using Ryujinx.Ava.UI.Views.Dialog;
|
using Ryujinx.Ava.UI.Views.Dialog;
|
||||||
using Ryujinx.Ava.UI.Windows;
|
using Ryujinx.Ava.UI.Windows;
|
||||||
|
|
@ -50,6 +51,7 @@ namespace Ryujinx.Ava.UI.Views.Main
|
||||||
AboutWindowMenuItem.Command = Commands.Create(AboutView.Show);
|
AboutWindowMenuItem.Command = Commands.Create(AboutView.Show);
|
||||||
CompatibilityListMenuItem.Command = Commands.Create(() => CompatibilityListWindow.Show());
|
CompatibilityListMenuItem.Command = Commands.Create(() => CompatibilityListWindow.Show());
|
||||||
LdnGameListMenuItem.Command = Commands.Create(() => LdnGamesListWindow.Show());
|
LdnGameListMenuItem.Command = Commands.Create(() => LdnGamesListWindow.Show());
|
||||||
|
SetupWizardMenuItem.Command = Commands.Create(() => RyujinxSetupWizardWindow.ShowAsync());
|
||||||
|
|
||||||
UpdateMenuItem.Command = MainWindowViewModel.UpdateCommand;
|
UpdateMenuItem.Command = MainWindowViewModel.UpdateCommand;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -144,10 +144,8 @@ namespace Ryujinx.Ava.UI.Windows
|
||||||
{
|
{
|
||||||
await ShowIntelMacWarningAsync();
|
await ShowIntelMacWarningAsync();
|
||||||
|
|
||||||
if (Program.IsFirstStart && RyujinxSetupWizardWindow.CanShowSetupWizard)
|
if (Program.IsFirstStart)
|
||||||
{
|
|
||||||
await RyujinxSetupWizardWindow.ShowAsync(this);
|
await RyujinxSetupWizardWindow.ShowAsync(this);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (CommandLineState.FirmwareToInstallPathArg.TryGet(out FilePath fwPath))
|
if (CommandLineState.FirmwareToInstallPathArg.TryGet(out FilePath fwPath))
|
||||||
|
|
@ -412,7 +410,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!RyujinxSetupWizardWindow.IsUsingSetupWizard)
|
else if (!RyujinxSetupWizardWindow.IsOpen)
|
||||||
{
|
{
|
||||||
ShowKeyErrorOnLoad = false;
|
ShowKeyErrorOnLoad = false;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue