Convert win / loss dialogs to new style.

This was SVN commit r10148.
This commit is contained in:
WhiteTreePaladin 2011-08-31 03:09:18 +00:00
parent 2469fdf8c6
commit 7d2411e6cb

View File

@ -196,19 +196,30 @@ function checkPlayerState()
{
if (playerState.state == "defeated")
{
closeMenu();
closeOpenDialogs();
g_GameEnded = true;
switchMusic("loss_1", 0.0);
g_SessionDialog.open("Defeat", "You have been defeated...\nDo you want to leave the game now?", null, 320, 160, leaveGame);
var btCaptions = ["Yes", "No"];
var btCode = [leaveGame, null];
messageBox(400, 200, "You have been defeated...\nDo you want to leave the game now?", "Defeat", 0, btCaptions, btCode);
}
else if (playerState.state == "won")
{
closeMenu();
closeOpenDialogs();
g_GameEnded = true;
switchMusic("win_1", 0.0);
if (!getGUIObjectByName("devCommandsRevealMap").checked)
getGUIObjectByName("devCommandsRevealMap").checked = true;
g_SessionDialog.open("Victory", "You have won the battle!\nDo you want to leave the game now?", null, 320, 160, leaveGame);
var btCaptions = ["Yes", "No"];
var btCode = [leaveGame, null];
messageBox(400, 200, "You have won the battle!\nDo you want to leave the game now?", "Victory", 0, btCaptions, btCode);
}
}
}