From c23351a4b936ebcf5ee240578e48e48667f8c565 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Fri, 10 Apr 2020 16:32:47 +1000 Subject: [PATCH] Menu System: Add confirmation to FOptionMenuItemSafeCommand() - Resolves 'https://forum.zdoom.org/viewtopic.php?f=340&t=67721'. --- source/common/menu/optionmenuitems.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/common/menu/optionmenuitems.h b/source/common/menu/optionmenuitems.h index 500c57b93..ca3a99c4a 100644 --- a/source/common/menu/optionmenuitems.h +++ b/source/common/menu/optionmenuitems.h @@ -155,11 +155,12 @@ public: bool Activate(FName caller) override { - auto msg = GStrings.localize(mPrompt.IsNotEmpty()? mPrompt.GetChars() : "$SAFEMESSAGE"); + FString msg; + msg << GStrings.localize(mPrompt.IsNotEmpty()? mPrompt.GetChars() : "$SAFEMESSAGE") << "\n\n" << GStrings.localize("$PRESSYN"); auto actionLabel = GStrings.localize(mLabel.GetChars()); //FStringf FullString("%s%s%s\n\n%s", TEXTCOLOR_WHITE, actionLabel, TEXTCOLOR_NORMAL, msg); - FStringf FullString("- %s -\n%s", actionLabel, msg); + FStringf FullString("- %s -\n%s", actionLabel, msg.GetChars()); M_StartMessage(FullString, 0, mScriptId); return true; }