This Trac instance is not used for development anymore!

We migrated our development workflow to git and Gitea.
To test the future redirection, replace trac by ariadne in the page URL.

Changeset 10148 for ps


Ignore:
Timestamp:
08/31/11 05:09:18 (13 years ago)
Author:
brian
Message:

Convert win / loss dialogs to new style.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ps/trunk/binaries/data/mods/public/gui/session/session.js

    r10146 r10148  
    197197        if (playerState.state == "defeated")
    198198        {
    199             g_GameEnded = true;
     199            closeMenu();
     200                        closeOpenDialogs();
     201
     202                        g_GameEnded = true;
    200203            switchMusic("loss_1", 0.0);
    201             g_SessionDialog.open("Defeat",  "You have been defeated...\nDo you want to leave the game now?", null, 320, 160, leaveGame);
     204
     205                        var btCaptions = ["Yes", "No"];
     206                        var btCode = [leaveGame, null];
     207                        messageBox(400, 200, "You have been defeated...\nDo you want to leave the game now?", "Defeat", 0, btCaptions, btCode);
    202208        }
    203209        else if (playerState.state == "won")
    204210        {
    205             g_GameEnded = true;
     211            closeMenu();
     212                        closeOpenDialogs();
     213
     214                        g_GameEnded = true;
    206215            switchMusic("win_1", 0.0);
    207216
     
    209218                getGUIObjectByName("devCommandsRevealMap").checked = true;
    210219
    211             g_SessionDialog.open("Victory", "You have won the battle!\nDo you want to leave the game now?", null, 320, 160, leaveGame);
     220                        var btCaptions = ["Yes", "No"];
     221                        var btCode = [leaveGame, null];
     222                        messageBox(400, 200, "You have won the battle!\nDo you want to leave the game now?", "Victory", 0, btCaptions, btCode);
    212223        }
    213224    }
Note: See TracChangeset for help on using the changeset viewer.