Add introduction prompt on first run.

This commit is contained in:
Paul Chote
2020-01-26 12:11:45 +00:00
committed by abcdefg30
parent e8df28c518
commit e6c1356d59
6 changed files with 696 additions and 31 deletions

View File

@@ -226,21 +226,35 @@ namespace OpenRA.Mods.Common.Widgets.Logic
}
menuType = MenuType.StartupPrompts;
Action onSysInfoComplete = () =>
Action onIntroductionComplete = () =>
{
LoadAndDisplayNews(webServices.GameNews, newsBG);
SwitchMenu(MenuType.Main);
Action onSysInfoComplete = () =>
{
LoadAndDisplayNews(webServices.GameNews, newsBG);
SwitchMenu(MenuType.Main);
};
if (SystemInfoPromptLogic.ShouldShowPrompt())
{
Ui.OpenWindow("MAINMENU_SYSTEM_INFO_PROMPT", new WidgetArgs
{
{ "onComplete", onSysInfoComplete }
});
}
else
onSysInfoComplete();
};
if (SystemInfoPromptLogic.ShouldShowPrompt())
if (IntroductionPromptLogic.ShouldShowPrompt())
{
Ui.OpenWindow("MAINMENU_SYSTEM_INFO_PROMPT", new WidgetArgs
Game.OpenWindow("MAINMENU_INTRODUCTION_PROMPT", new WidgetArgs
{
{ "onComplete", onSysInfoComplete }
{ "onComplete", onIntroductionComplete }
});
}
else
onSysInfoComplete();
onIntroductionComplete();
Game.OnShellmapLoaded += OpenMenuBasedOnLastGame;
}