Beautified profile results table in case that karts name are

too long (or too short).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9385 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2011-07-29 06:25:12 +00:00
parent 115e0cc1c5
commit c5ef5eb705

View File

@ -193,14 +193,16 @@ void ProfileWorld::enterRaceOverState()
}
float min_t=999999.9f, max_t=0.0, av_t=0.0;
printf("Name\tstart\tend\ttime\tav.speed\n");
printf("Name\t\tstart\tend\ttime\tav.speed\n");
for ( KartList::size_type i = 0; i < m_karts.size(); ++i)
{
max_t = std::max(max_t, m_karts[i]->getFinishTime());
min_t = std::min(min_t, m_karts[i]->getFinishTime());
av_t += m_karts[i]->getFinishTime();
printf("%ls\t%d\t%d\t%f",
m_karts[i]->getName(), 1 + (int)i,
printf("%s\t%s%d\t%d\t%f",
m_karts[i]->getIdent().c_str(),
m_karts[i]->getIdent().size()<8 ? "\t" : "",
1 + (int)i,
m_karts[i]->getPosition(),
m_karts[i]->getFinishTime());
if(m_profile_mode==PROFILE_LAPS)