- Fix stat output to use the console scale

This commit is contained in:
Magnus Norddahl 2017-06-03 16:58:09 +02:00
parent cdc0bf1cd5
commit f593e2aa3c

View file

@ -89,8 +89,10 @@ void FStat::ToggleStat ()
void FStat::PrintStat ()
{
int textScale = active_con_scale();
int fontheight = ConFont->GetHeight() + 1;
int y = SCREENHEIGHT;
int y = SCREENHEIGHT / textScale;
int count = 0;
for (FStat *stat = FirstStat; stat != NULL; stat = stat->m_Next)
@ -107,7 +109,10 @@ void FStat::PrintStat ()
// Count number of linefeeds but ignore terminating ones.
if (stattext[i] == '\n') y -= fontheight;
}
screen->DrawText(ConFont, CR_GREEN, 5, y, stattext, TAG_DONE);
screen->DrawText(ConFont, CR_GREEN, 5 / textScale, y, stattext,
DTA_VirtualWidth, screen->GetWidth() / textScale,
DTA_VirtualHeight, screen->GetHeight() / textScale,
DTA_KeepRatio, true, TAG_DONE);
count++;
}
}