Skip to content

Commit

Permalink
Fixed|InFine: Newlines in finale texts
Browse files Browse the repository at this point in the history
IssueID #2408
  • Loading branch information
skyjake committed Jan 31, 2020
1 parent 13bafd8 commit 966da08
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions doomsday/apps/client/src/ui/infine/finaletextwidget.cpp
Expand Up @@ -62,6 +62,7 @@ DENG2_PIMPL_NOREF(FinaleTextWidget)

for (; *text; text++)
{
if (*text == '\n') break;
if (*text == '\\')
{
if (!*++text) break;
Expand Down Expand Up @@ -183,6 +184,15 @@ void FinaleTextWidget::draw(Vector3f const &offset)
linew = d->textLineWidth(ptr);

ch = *ptr;
if (*ptr == '\n') // Newline? (see below for unescaped \n)
{
x = 0;
y += FR_CharHeight('A') * (1 + d->lineHeight);
linew = -1;
cnt++; // Include newlines in the wait count.
continue;
}

if (*ptr == '\\') // Escape?
{
if (!*++ptr)
Expand Down

0 comments on commit 966da08

Please sign in to comment.