Read localized names of the karts in race result gui - soccer mode.

Also use one standard color for both cases when red and blue team wins. It looks IMO better, I hope it's not a problem for others.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14254 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
deveee 2013-10-14 20:19:49 +00:00
parent a7d62553f1
commit b16973dd8f

View File

@ -836,7 +836,7 @@ void RaceResultGUI::displaySoccerResults()
//Draw win text
core::stringw resultText;
static video::SColor color;
static video::SColor color = video::SColor(255, 255, 255, 255);
gui::IGUIFont* font = GUIEngine::getTitleFont();
int currX = UserConfigParams::m_width/2;
RowInfo *ri = &(m_all_row_infos[0]);
@ -847,18 +847,15 @@ void RaceResultGUI::displaySoccerResults()
if(teamScore[0] > teamScore[1])
{
resultText = _("Red Team Wins");
color = video::SColor(255, 255, 0, 0);
}
else if(teamScore[1] > teamScore[0])
{
resultText = _("Blue Team Wins");
color = video::SColor(255,0,0,255);
}
else
{
//Cannot really happen now. Only in time limited matches.
resultText = _("It's a draw");
color = video::SColor(255, 255, 255, 255);
}
core::rect<s32> pos(currX, currY, currX, currY);
font->draw(resultText.c_str(), pos, color, true, true);
@ -909,8 +906,8 @@ void RaceResultGUI::displaySoccerResults()
for(unsigned int i=0; i<scorers.size(); i++)
{
std::string kartName = race_manager->getKartIdent(scorers.at(i)).c_str();
resultText = _(kartName.c_str());
resultText = soccerWorld->getKart(scorers.at(i))->
getKartProperties()->getName();
resultText.append(" ");
resultText.append(StringUtils::timeToString(scoreTimes.at(i)).c_str());
pos = core::rect<s32>(currX,currY,currX,currY);
@ -932,8 +929,8 @@ void RaceResultGUI::displaySoccerResults()
scoreTimes = soccerWorld->getScoreTimes(1);
for(unsigned int i=0; i<scorers.size(); i++)
{
std::string kartName = race_manager->getKartIdent(scorers.at(i)).c_str();
resultText = _(kartName.c_str());
resultText = soccerWorld->getKart(scorers.at(i))->
getKartProperties()->getName();
resultText.append(" ");
resultText.append(StringUtils::timeToString(scoreTimes.at(i)).c_str());
pos = core::rect<s32>(currX,currY,currX,currY);