Show kart rank in race result screen (#4551)

This commit is contained in:
Kuba 2021-07-14 19:19:55 +02:00 committed by GitHub
parent 808dc0e8e4
commit feb8ba51ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1325,6 +1325,13 @@ void RaceResultGUI::unload()
: video::SColor(255, 255, 255, 255); : video::SColor(255, 255, 255, 255);
unsigned int current_x = x; unsigned int current_x = x;
if (RaceManager::get()->getNumberOfKarts() >= 10)
{
int pos_rank_width = m_font->getDimension(core::stringw(n + 1).c_str()).Width;
core::recti pos_rank(current_x, y, pos_rank_width, m_distance_between_rows);
m_font->draw(core::stringw(n + 1), pos_rank, color);
current_x += 48;
}
// Draw kart color circle if kart has custom color // Draw kart color circle if kart has custom color
if (ri->m_kart_color > 0.0) if (ri->m_kart_color > 0.0)