Indicate challenge type

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11814 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2012-10-30 00:10:54 +00:00
parent 9b74d0cdd0
commit 9f31509898
2 changed files with 15 additions and 0 deletions

View File

@ -6,6 +6,14 @@
<spacer height="2%" width="1"/>
<div width="100%" layout="horizontal-row" height="fit">
<label id="race_type" text="Type :" I18N="Type of race, in a challenge"/>
<spacer width="5" height="1"/>
<label id="race_type_val" proportion="1"/>
</div>
<spacer height="2%" width="1"/>
<div width="100%" proportion="1" layout="horizontal-row">
<icon-button id="novice" icon="gui/difficulty_easy.png"
I18N="Difficulty" text="Novice" height="100%"/>

View File

@ -127,6 +127,13 @@ SelectChallengeDialog::SelectChallengeDialog(const float percentWidth,
const wchar_t* track_name = track_manager->getTrack(c->getData()->getTrackId())->getName();
getWidget<LabelWidget>("title")->setText( track_name, true );
}
LabelWidget* typeLbl = getWidget<LabelWidget>("race_type_val");
if (c->getData()->getGPId().size() > 0)
typeLbl->setText(_("Grand Prix"), false );
else
typeLbl->setText( RaceManager::getNameOf(c->getData()->getMinorMode()), false );
}
// ----------------------------------------------------------------------------