Fixed rank number on high resolutions

This commit is contained in:
Deve
2019-03-05 21:52:14 +01:00
parent bb42d72bc5
commit c1f49c3d07

View File

@@ -861,7 +861,9 @@ void RaceGUI::drawRank(const AbstractKart *kart,
}
gui::ScalableFont* font = GUIEngine::getHighresDigitFont();
font->setScale(min_ratio * scale);
int font_height = font->getDimension(L"X").Height;
font->setScale((float)meter_height / font_height * 0.4f * scale);
font->setShadow(video::SColor(255, 128, 0, 0));
std::ostringstream oss;
oss << rank; // the current font has no . :( << ".";