Add login/profile display to the main menu.

This commit is contained in:
Paul Chote
2018-07-07 14:28:19 +00:00
committed by abcdefg30
parent c74159e549
commit b5a5eecc25
12 changed files with 535 additions and 0 deletions

View File

@@ -228,6 +228,16 @@ namespace OpenRA.Mods.Common.Widgets.Logic
menuType != MenuType.SystemInfoPrompt &&
webServices.ModVersionStatus == ModVersionStatus.Outdated;
var playerProfile = widget.GetOrNull("PLAYER_PROFILE_CONTAINER");
if (playerProfile != null)
{
Func<bool> minimalProfile = () => Ui.CurrentWindow() != null;
Game.LoadWidget(world, "LOCAL_PROFILE_PANEL", playerProfile, new WidgetArgs()
{
{ "minimalProfile", minimalProfile }
});
}
// System information opt-out prompt
var sysInfoPrompt = widget.Get("SYSTEM_INFO_PROMPT");
sysInfoPrompt.IsVisible = () => menuType == MenuType.SystemInfoPrompt;