Skip to content

Commit

Permalink
Heretic|Menu: Confirming the Nightmare skill level
Browse files Browse the repository at this point in the history
Only shown if the NIGHTMARE text string is non-empty.

IssueID #2409
  • Loading branch information
skyjake committed Jan 31, 2020
1 parent 31416ca commit 13bafd8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 deletions doomsday/apps/plugins/common/src/hu_menu.cpp
Expand Up @@ -3587,10 +3587,10 @@ void Hu_MenuFocusSkillMode(Widget &wi, Widget::Action action)
Hu_MenuDefaultFocusAction(wi, action);
}

#if __JDOOM__
#if __JDOOM__ || __JHERETIC__
static int Hu_MenuConfirmInitNewGame(msgresponse_t response, int /*userValue*/, void * /*context*/)
{
if(response == MSG_YES)
if (response == MSG_YES)
{
Hu_MenuInitNewGame(true);
}
Expand All @@ -3604,11 +3604,15 @@ static int Hu_MenuConfirmInitNewGame(msgresponse_t response, int /*userValue*/,
*/
static void Hu_MenuInitNewGame(bool confirmed)
{
#if __JDOOM__
if(!confirmed && SM_NIGHTMARE == mnSkillmode)
#if __JDOOM__ || __JHERETIC__
const int nightmareTextNum = Defs().getTextNum("NIGHTMARE");
if (nightmareTextNum >= 0 && strlen(Defs().text[nightmareTextNum].text) > 0)
{
Hu_MsgStart(MSG_YESNO, NIGHTMARE, Hu_MenuConfirmInitNewGame, 0, NULL);
return;
if (!confirmed && mnSkillmode == SM_NIGHTMARE)
{
Hu_MsgStart(MSG_YESNO, Defs().text[nightmareTextNum].text, Hu_MenuConfirmInitNewGame, 0, NULL);
return;
}
}
#else
DENG2_UNUSED(confirmed);
Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/plugins/heretic/defs/text.ded
Expand Up @@ -59,7 +59,7 @@ Text {

Text {
ID = "NIGHTMARE";
Text = "Are you sure? This skill level\nisn't even remotely fair.";
Text = ""; # Are you sure? This skill level\nisn't even remotely fair.
}

Text {
Expand Down

0 comments on commit 13bafd8

Please sign in to comment.