Skip to content

Commit

Permalink
All Games|UI: Include the save slot ID in quick load/save confirmatio…
Browse files Browse the repository at this point in the history
…n messages

As the save slots are a user interface mechanism the confirmation
messages should include the slot ID so that users can more easily
double-check their action (helpful in case two or more saved games
have similar descriptions).
  • Loading branch information
danij-deng committed Nov 29, 2014
1 parent 1c61b67 commit 26e1dcd
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
9 changes: 7 additions & 2 deletions doomsday/plugins/common/src/g_game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2358,7 +2358,10 @@ D_CMD(LoadSession)
S_LocalSound(SFX_QUICKLOAD_PROMPT, nullptr);
// Compose the confirmation message.
String const &existingDescription = COMMON_GAMESESSION->savedUserDescription(sslot->saveName());
AutoStr *msg = Str_Appendf(AutoStr_NewStd(), QLPROMPT, existingDescription.toUtf8().constData());
AutoStr *msg = Str_Appendf(AutoStr_NewStd(), QLPROMPT,
sslot->id().toUtf8().constData(),
existingDescription.toUtf8().constData());

Hu_MsgStart(MSG_YESNO, Str_Text(msg), loadSessionConfirmed, 0, new String(sslot->id()));
return true;
}
Expand Down Expand Up @@ -2469,7 +2472,9 @@ D_CMD(SaveSession)

// Compose the confirmation message.
String const existingDescription = COMMON_GAMESESSION->savedUserDescription(sslot->saveName());
AutoStr *msg = Str_Appendf(AutoStr_NewStd(), QSPROMPT, existingDescription.toUtf8().constData());
AutoStr *msg = Str_Appendf(AutoStr_NewStd(), QSPROMPT,
sslot->id().toUtf8().constData(),
existingDescription.toUtf8().constData());

savesessionconfirmed_params_t *parm = new savesessionconfirmed_params_t;
parm->slotId = sslot->id();
Expand Down
4 changes: 2 additions & 2 deletions doomsday/plugins/doom/defs/text.ded
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ Text {

Text {
ID = "QSPROMPT";
Text = "Save over your game named\n\n'%s'?";
Text = "Really save over the game in slot %s named\n\n'%s' ?";
}

Text {
ID = "QLPROMPT";
Text = "Are you sure you want to load the game named\n\n'%s'?";
Text = "Really load the game in slot %s named\n\n'%s' ?";
}

Text {
Expand Down
4 changes: 2 additions & 2 deletions doomsday/plugins/doom64/defs/text.ded
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ Text {

Text {
ID = "QSPROMPT";
Text = "Save over your game named\n\n'%s'?";
Text = "Really save over the game in slot %s named\n\n'%s' ?";
}

Text {
ID = "QLPROMPT";
Text = "Are you sure you want to load the game named\n\n'%s'?";
Text = Really load the game in slot %s named\n\n'%s' ?";
}

Text {
Expand Down
4 changes: 2 additions & 2 deletions doomsday/plugins/heretic/defs/text.ded
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ Text {

Text {
ID = "QSPROMPT";
Text = "Save over your game named\n\n'%s'?";
Text = "Really save over the game in slot %s named\n\n'%s' ?";
}

Text {
ID = "QLPROMPT";
Text = "Are you sure you want to load the game named\n\n'%s'?";
Text = "Really load the game in slot %s named\n\n'%s' ?";
}

Text {
Expand Down
4 changes: 2 additions & 2 deletions doomsday/plugins/hexen/defs/text.ded
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ Text {

Text {
ID = "QSPROMPT";
Text = "Save over your game named\n\n'%s'?";
Text = "Really save over the game in slot %s named\n\n'%s' ?";
}

Text {
ID = "QLPROMPT";
Text = "Are you sure you want to load the game named\n\n'%s'?";
Text = "Really load the game in slot %s named\n\n'%s' ?";
}

Text {
Expand Down

0 comments on commit 26e1dcd

Please sign in to comment.