From 6bfdd10a5ce242beb558a1b54db43bf9d39217f6 Mon Sep 17 00:00:00 2001 From: nashmuhandes Date: Thu, 14 Apr 2016 05:43:20 +0800 Subject: [PATCH] Show the command label when choosing a SafeCommand (like Reset2Defaults) in the menu. --- src/menu/optionmenuitems.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/menu/optionmenuitems.h b/src/menu/optionmenuitems.h index 0f315d5f6..28135e78d 100644 --- a/src/menu/optionmenuitems.h +++ b/src/menu/optionmenuitems.h @@ -122,7 +122,20 @@ public: bool Activate() { const char *msg = GStrings("SAFEMESSAGE"); - if (msg) M_StartMessage(msg, 0); + + const char *actionLabel = mLabel; + if (actionLabel != NULL) + { + if (*actionLabel == '$') + { + actionLabel = GStrings(actionLabel + 1); + } + } + + FString FullString; + FullString.Format(TEXTCOLOR_WHITE "%s" TEXTCOLOR_NORMAL "\n\n" "%s", actionLabel, msg); + + if (msg && actionLabel && FullString) M_StartMessage(FullString, 0); return true; } };