Rework a bit select challenge dialog. Show most important information first. Fix required rank for FTL
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11916 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
82e814dfa4
commit
4f439acf13
@ -37,26 +37,31 @@ using namespace GUIEngine;
|
||||
|
||||
core::stringw getLabel(RaceManager::Difficulty difficulty, const ChallengeData* c)
|
||||
{
|
||||
core::stringw label = _("Number of AI Karts : %i",
|
||||
c->getNumKarts(difficulty) - 1);
|
||||
core::stringw label;
|
||||
|
||||
if (c->getPosition(difficulty) != -1)
|
||||
{
|
||||
label.append(L"\n");
|
||||
label.append( _("Required Rank : %i", c->getPosition(difficulty)) );
|
||||
int r = c->getPosition(difficulty);
|
||||
if (c->getMinorMode() == RaceManager::MINOR_MODE_FOLLOW_LEADER) r--;
|
||||
|
||||
if (label.size() > 0) label.append(L"\n");
|
||||
label.append( _("Required Rank : %i", r) );
|
||||
}
|
||||
if (c->getTime(difficulty) > 0)
|
||||
{
|
||||
label.append(L"\n");
|
||||
if (label.size() > 0) label.append(L"\n");
|
||||
label.append( _("Required Time : %i",
|
||||
StringUtils::timeToString(c->getTime(difficulty)).c_str()) );
|
||||
}
|
||||
if (c->getEnergy(difficulty) > 0)
|
||||
{
|
||||
label.append(L"\n");
|
||||
if (label.size() > 0) label.append(L"\n");
|
||||
label.append( _("Required Nitro Points : %i", c->getEnergy(difficulty)) );
|
||||
}
|
||||
|
||||
if (label.size() > 0) label.append(L"\n");
|
||||
label.append(_("Number of AI Karts : %i", c->getNumKarts(difficulty) - 1));
|
||||
|
||||
return label;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user