- Increased size of the savegame comment area.

This commit is contained in:
drfrag666 2018-04-04 11:24:28 +02:00 committed by Christoph Oelckers
parent 8ff81c93e8
commit 80f57dfaf0
2 changed files with 6 additions and 3 deletions

View File

@ -487,7 +487,7 @@ unsigned FSavegameManager::ExtractSaveData(int index)
arc("Comment", pcomment);
comment = time;
if (time.Len() > 0) comment += "\n\n";
if (time.Len() > 0) comment += "\n";
comment += pcomment;
SaveComment = V_BreakLines(SmallFont, WindowSize, comment.GetChars());
@ -619,10 +619,12 @@ void FSavegameManager::DrawSaveComment(FFont *font, int cr, int x, int y, int sc
CleanXfac = CleanYfac = scalefactor;
int maxlines = screen->GetHeight()>400?10:screen->GetHeight()>240?7:screen->GetHeight()>200?8:5;
if (SmallFont->GetHeight() > 9) maxlines--; // not Doom
// I'm not sure why SaveComment would go nullptr in this loop, but I got
// a crash report where it was nullptr when i reached 1, so now I check
// for that.
for (int i = 0; SaveComment != nullptr && SaveComment[i].Width >= 0 && i < 6; ++i)
for (int i = 0; SaveComment != nullptr && SaveComment[i].Width >= 0 && i < maxlines; ++i)
{
screen->DrawText(font, cr, x, y + font->GetHeight() * i * scalefactor, SaveComment[i].Text, DTA_CleanNoMove, true, TAG_DONE);
}

View File

@ -132,7 +132,8 @@ class LoadSaveMenu : ListMenu
commentLeft = savepicLeft;
commentTop = savepicTop + savepicHeight + 16;
commentWidth = savepicWidth;
commentHeight = (51+(screen.GetHeight()>200?10:0))*CleanYfac;
//commentHeight = (51+(screen.GetHeight()>200?10:0))*CleanYfac;
commentHeight = listboxHeight - savepicHeight - 16;
commentRight = commentLeft + commentWidth;
commentBottom = commentTop + commentHeight;
}