mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- Increased size of the savegame comment area.
This commit is contained in:
parent
8ff81c93e8
commit
80f57dfaf0
2 changed files with 6 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue