From 76a44ebf9cdef82a3d1dc08bd43e5a960163de54 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 26 Feb 2017 12:04:34 +0200 Subject: [PATCH] Fixed splitting of long lines in message box menu https://mantis.zdoom.org/view.php?id=338 --- src/menu/messagebox.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/menu/messagebox.cpp b/src/menu/messagebox.cpp index a1a0fda769..a68bbc5f10 100644 --- a/src/menu/messagebox.cpp +++ b/src/menu/messagebox.cpp @@ -67,7 +67,8 @@ DMenu *CreateMessageBoxMenu(DMenu *parent, const char *message, int messagemode, { auto c = PClass::FindClass("MessageBoxMenu"); auto p = c->CreateNew(); - VMValue params[] = { p, parent, FString(message), messagemode, playsound, action.GetIndex(), reinterpret_cast(handler) }; + const FString msg = '$' == message[0] ? GStrings(message + 1) : message; + VMValue params[] = { p, parent, msg, messagemode, playsound, action.GetIndex(), reinterpret_cast(handler) }; auto f = dyn_cast(c->Symbols.FindSymbol("Init", false)); GlobalVMStack.Call(f->Variants[0].Implementation, params, countof(params), nullptr, 0);