1
0
forked from mirrors/0ad

After discussion with scythetwirler with input from Philip and Mythos, popup dialogs (like for delete, resign, and exit) should have no on the right as we want the user to click no in most of those cases. It's the 'recommended' action. In the case of save/cancel or continue/back, save and continue should always be on the right as that's the 'recommended' action. With some review, this placement seems consistant across operating systems.

This was SVN commit r15129.
This commit is contained in:
JoshuaJB
2014-05-08 03:43:03 +00:00
parent c37a8cafc3
commit bb65358dac
4 changed files with 28 additions and 27 deletions
@@ -208,13 +208,13 @@
</def> </def>
<def id="rating" color="255 255 255" width="30%"> <def id="rating" color="255 255 255" width="30%">
<translatableAttribute id="heading">Rating</translatableAttribute> <translatableAttribute id="heading">Rating</translatableAttribute>
</def> </def>
</object> </object>
<object type="button" style="ModernButtonRed" size="50%+5 100%-45 50%+133 100%-17"> <object type="button" style="ModernButtonRed" size="50%-133 100%-45 50%-5 100%-17">
<translatableAttribute id="caption">Back</translatableAttribute> <translatableAttribute id="caption">Back</translatableAttribute>
<action on="Press">Engine.GetGUIObjectByName("leaderboard").hidden = true;Engine.GetGUIObjectByName("leaderboardFade").hidden = true;</action> <action on="Press">Engine.GetGUIObjectByName("leaderboard").hidden = true;Engine.GetGUIObjectByName("leaderboardFade").hidden = true;</action>
</object> </object>
<object type="button" style="ModernButtonRed" size="50%-133 100%-45 50%-5 100%-17"> <object type="button" style="ModernButtonRed" size="50%+5 100%-45 50%+133 100%-17">
<translatableAttribute id="caption">Update</translatableAttribute> <translatableAttribute id="caption">Update</translatableAttribute>
<action on="Press">Engine.SendGetBoardList();</action> <action on="Press">Engine.SendGetBoardList();</action>
</object> </object>
@@ -305,8 +305,8 @@ function getBuildString()
function exitGamePressed() function exitGamePressed()
{ {
closeMenu(); closeMenu();
var btCaptions = [translate("No"), translate("Yes")]; var btCaptions = [translate("Yes"), translate("No")];
var btCode = [null, Engine.Exit]; var btCode = [Engine.Exit, null];
messageBox(400, 200, translate("Are you sure you want to quit 0 A.D.?"), translate("Confirmation"), 0, btCaptions, btCode); messageBox(400, 200, translate("Are you sure you want to quit 0 A.D.?"), translate("Confirmation"), 0, btCaptions, btCode);
} }
+11 -11
View File
@@ -136,8 +136,8 @@ function resignMenuButton()
closeMenu(); closeMenu();
closeOpenDialogs(); closeOpenDialogs();
pauseGame(); pauseGame();
var btCaptions = [translate("No"), translate("Yes")]; var btCaptions = [translate("Yes"), translate("No")];
var btCode = [resumeGame, resignGame]; var btCode = [resignGame, resumeGame];
messageBox(400, 200, translate("Are you sure you want to resign?"), translate("Confirmation"), 0, btCaptions, btCode); messageBox(400, 200, translate("Are you sure you want to resign?"), translate("Confirmation"), 0, btCaptions, btCode);
} }
@@ -148,27 +148,27 @@ function exitMenuButton()
pauseGame(); pauseGame();
if (g_IsNetworked && g_IsController) if (g_IsNetworked && g_IsController)
{ {
var btCode = [resumeGame, leaveGame]; var btCode = [leaveGame, resumeGame];
var message = translate("Are you sure you want to quit? Leaving will disconnect all other players."); var message = translate("Are you sure you want to quit? Leaving will disconnect all other players.");
} }
else if (g_IsNetworked && !g_GameEnded && !g_IsObserver) else if (g_IsNetworked && !g_GameEnded && !g_IsObserver)
{ {
var btCode = [resumeGame, networkReturnQuestion]; var btCode = [networkReturnQuestion, resumeGame];
var message = translate("Are you sure you want to quit?"); var message = translate("Are you sure you want to quit?");
} }
else else
{ {
var btCode = [resumeGame, leaveGame]; var btCode = [leaveGame, resumeGame];
var message = translate("Are you sure you want to quit?"); var message = translate("Are you sure you want to quit?");
} }
messageBox(400, 200, message, translate("Confirmation"), 0, [translate("No"), translate("Yes")], btCode); messageBox(400, 200, message, translate("Confirmation"), 0, [translate("Yes"), translate("No")], btCode);
} }
function networkReturnQuestion() function networkReturnQuestion()
{ {
var btCaptions = [translate("I resign"), translate("I will return")]; var btCaptions = [translate("I will return"), translate("I resign")];
var btCode = [resignGame, leaveGame]; var btCode = [leaveGame, resignGame];
var btArgs = [false, true]; var btArgs = [true, false];
messageBox(400, 200, translate("Do you want to resign or will you return soon?"), translate("Confirmation"), 0, btCaptions, btCode, btArgs); messageBox(400, 200, translate("Do you want to resign or will you return soon?"), translate("Confirmation"), 0, btCaptions, btCode, btArgs);
} }
@@ -182,8 +182,8 @@ function openDeleteDialog(selection)
Engine.PostNetworkCommand({"type": "delete-entities", "entities": selectionArg}); Engine.PostNetworkCommand({"type": "delete-entities", "entities": selectionArg});
}; };
var btCaptions = [translate("No"), translate("Yes")]; var btCaptions = [translate("Yes"), translate("No")];
var btCode = [resumeGame, deleteSelectedEntities]; var btCode = [deleteSelectedEntities, resumeGame];
messageBox(400, 200, translate("Destroy everything currently selected?"), translate("Delete"), 0, btCaptions, btCode, [null, selection]); messageBox(400, 200, translate("Destroy everything currently selected?"), translate("Delete"), 0, btCaptions, btCode, [null, selection]);
} }
@@ -394,23 +394,24 @@
<!-- Chat window --> <!-- Chat window -->
<object name="chatDialogPanel" size="50%-180 50%-48 50%+180 50%+36" type="image" hidden="true" sprite="genericPanel"> <object name="chatDialogPanel" size="50%-180 50%-48 50%+180 50%+36" type="image" hidden="true" sprite="genericPanel">
<object name="chatInput" size="16 12 100%-16 36" type="input" style="ModernInput" max_length="80"> <object name="chatInput" size="16 12 100%-16 36" type="input" style="ModernInput" max_length="80">
<action on="Press">submitChatInput();</action> <action on="Press">submitChatInput();</action>
</object> </object>
<object size="16 100%-40 30%+16 100%-12" type="button" style="StoneButton"> <object size="16 100%-40 30%+16 100%-12" type="button" style="StoneButton">
<translatableAttribute id="caption">Cancel</translatableAttribute> <translatableAttribute id="caption">Cancel</translatableAttribute>
<action on="Press">closeChat();</action> <action on="Press">closeChat();</action>
</object> </object>
<object size="30%+24 100%-40 60%+24 100%-12" type="button" style="StoneButton"> <object name="toggleTeamChat" size="30%+22 100%-36 30%+40 100%-6" type="checkbox" style="ModernTickBox"/>
<object size="30%+40 100%-40 60%+16 100%-12" type="text" style="ModernLeftLabelText">
Team Only
</object>
<object size="60%+16 100%-40 100%-16 100%-12" type="button" style="StoneButton">
<translatableAttribute id="caption">Send</translatableAttribute> <translatableAttribute id="caption">Send</translatableAttribute>
<action on="Press">submitChatInput();</action> <action on="Press">submitChatInput();</action>
</object> </object>
<object name="toggleTeamChat" size="60%+32 100%-34 60%+48 100%-6" type="checkbox" style="ModernTickBox"/>
<object size="60%+48 100%-40 100% 100%-12" type="text" style="ModernLeftLabelText">
Team Only
</object>
</object> </object>
<!-- ================================ ================================ --> <!-- ================================ ================================ -->