Improve game setup GUI performance by switching from main menu instead of pushing the page on top of the stsck

This was SVN commit r13828.
This commit is contained in:
historic_bruno 2013-09-12 15:12:08 +00:00
parent 176cc55547
commit 82fb0ce6be
4 changed files with 4 additions and 6 deletions

View File

@ -337,7 +337,7 @@ function handleNetMessage(message)
{
case "disconnected":
Engine.DisconnectNetworkGame();
Engine.PopGuiPage();
Engine.SwitchGuiPage("page_pregame.xml")();
reportDisconnect(message.reason);
break;

View File

@ -308,7 +308,7 @@
<action on="Press">
<![CDATA[
cancelSetup();
Engine.PopGuiPage();
Engine.SwitchGuiPage("page_pregame.xml");
]]>
</action>
</object>

View File

@ -118,8 +118,7 @@ function onTick()
}
else
{
Engine.PopGuiPage();
Engine.PushGuiPage("page_gamesetup.xml", { "type": g_GameType });
Engine.SwitchGuiPage("page_gamesetup.xml", { "type": g_GameType });
return; // don't process any more messages - leave them for the game GUI loop
}

View File

@ -169,8 +169,7 @@ Status: $status.
>
Matches
<action on="Press">
closeMenu();
Engine.PushGuiPage("page_gamesetup.xml", { type: "offline" });
Engine.SwitchGuiPage("page_gamesetup.xml", { type: "offline" });
</action>
</object>