Menu System: Add confirmation to FOptionMenuItemSafeCommand()

- Resolves 'https://forum.zdoom.org/viewtopic.php?f=340&t=67721'.
This commit is contained in:
Mitchell Richters 2020-04-10 16:32:47 +10:00 committed by Christoph Oelckers
parent 4eb7b11ea6
commit c23351a4b9

View file

@ -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;
}