From c5ef5eb705c763ab647a126ca4bf24ed32a940ff Mon Sep 17 00:00:00 2001 From: hikerstk Date: Fri, 29 Jul 2011 06:25:12 +0000 Subject: [PATCH] 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 --- src/modes/profile_world.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modes/profile_world.cpp b/src/modes/profile_world.cpp index 7aa2d36c7..02c4fa419 100644 --- a/src/modes/profile_world.cpp +++ b/src/modes/profile_world.cpp @@ -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)