- strip trailing spaces off the lines for intermission texts.

Some mods have trailing spaces here that affect the formatting.
This commit is contained in:
Christoph Oelckers 2021-05-19 21:28:16 +02:00
parent a3da915812
commit e963010eea

View file

@ -309,6 +309,15 @@ void DIntermissionScreenText::Init(FIntermissionAction *desc, bool first)
Super::Init(desc, first);
mText = static_cast<FIntermissionActionTextscreen*>(desc)->mText;
if (mText[0] == '$') mText = GStrings(&mText[1]);
auto lines = mText.Split("\n");
mText = "";
for (auto& line : lines)
{
line.StripRight();
mText << line << "\n";
}
mTextSpeed = static_cast<FIntermissionActionTextscreen*>(desc)->mTextSpeed;
mTextX = static_cast<FIntermissionActionTextscreen*>(desc)->mTextX;
usesDefault = mTextX < 0;