Pause the game when users navigate to the options menu in SP mode

This commit is contained in:
Scott_NZ
2013-03-17 21:14:49 +13:00
parent 86b55a6444
commit 2722fc5434
7 changed files with 37 additions and 15 deletions

View File

@@ -92,9 +92,17 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
}
ingameRoot.IsVisible = () => false;
if (world.LobbyInfo.IsSinglePlayer)
world.IssueOrder(Order.PauseGame());
Game.LoadWidget(world, "INGAME_MENU", Ui.Root, new WidgetArgs()
{
{ "onExit", () => ingameRoot.IsVisible = () => true }
{ "onExit", () =>
{
ingameRoot.IsVisible = () => true;
if (world.LobbyInfo.IsSinglePlayer)
world.IssueOrder(Order.PauseGame());
}
}
});
}