Ticket #3200: t3200_fix_message_box_button_order.patch

File t3200_fix_message_box_button_order.patch, 2.4 KB (added by elexis, 9 years ago)

Corrects the order of the buttons in all message boxes that had it wrong.

  • binaries/data/mods/public/gui/session/menu.js

     
    146146    closeMenu();
    147147    closeOpenDialogs();
    148148    pauseGame();
    149149    if (g_IsNetworked && g_IsController)
    150150    {
    151         var btCode = [resumeGame, leaveGame];
    152151        var message = translate("Are you sure you want to quit? Leaving will disconnect all other players.");
     152        var btCode = [leaveGame, resumeGame];
    153153    }
    154154    else if (g_IsNetworked && !g_GameEnded && !g_IsObserver)
    155155    {
    156         var btCode = [resumeGame, networkReturnQuestion];
    157156        var message = translate("Are you sure you want to quit?");
     157        var btCode = [networkReturnQuestion, resumeGame];
    158158    }
    159159    else
    160160    {
    161         var btCode = [resumeGame, leaveGame];
    162161        var message = translate("Are you sure you want to quit?");
     162        var btCode = [leaveGame, resumeGame];
    163163    }
    164     messageBox(400, 200, message, translate("Confirmation"), 0, [translate("No"), translate("Yes")], btCode);
     164    messageBox(400, 200, message, translate("Confirmation"), 0, [translate("Yes"), translate("No")], btCode);
    165165}
    166166
    167167function networkReturnQuestion()
    168168{
    169     var btCaptions = [translate("I will return"), translate("I resign")];
    170     var btCode = [leaveGame, resignGame];
    171     var btArgs = [true, false];
     169    var btCaptions = [translate("I resign"), translate("I will return")];
     170    var btCode = [resignGame, leaveGame];
     171    var btArgs = [false, true];
    172172    messageBox(400, 200, translate("Do you want to resign or will you return soon?"), translate("Confirmation"), 0, btCaptions, btCode, btArgs);
    173173}
    174174
    175175function openDeleteDialog(selection)
    176176{
  • binaries/data/mods/public/gui/session/session.js

     
    474475        var btCode = [null];
    475476        var message = translate("Press OK to continue");
    476477    }
    477478    else
    478479    {
    479         var btCaptions = [translate("No"), translate("Yes")];
    480         var btCode = [null, leaveGame];
     480        var btCaptions = [translate("Yes"), translate("No")];
     481        var btCode = [leaveGame, null];
    481482        var message = translate("Do you want to quit?");
    482483    }
    483484
    484485    if (playerState.state == "defeated")
    485486    {