Show the command label when choosing a SafeCommand (like Reset2Defaults) in the menu.

This commit is contained in:
nashmuhandes 2016-04-14 05:43:20 +08:00 committed by Christoph Oelckers
parent 2327107f32
commit 6bfdd10a5c

View file

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