Replace lap number indicator by challenge type indicator
This commit is contained in:
parent
bbfc4dce82
commit
fbb0f48101
@ -291,23 +291,33 @@ ChallengeData::ChallengeData(const std::string& filename)
|
|||||||
const irr::core::stringw ChallengeData::getChallengeDescription() const
|
const irr::core::stringw ChallengeData::getChallengeDescription() const
|
||||||
{
|
{
|
||||||
core::stringw description;
|
core::stringw description;
|
||||||
if (!m_track_id.empty())
|
|
||||||
|
if (m_is_unlock_list)
|
||||||
|
return description;
|
||||||
|
|
||||||
|
if (m_mode == CM_GRAND_PRIX)
|
||||||
{
|
{
|
||||||
if (m_minor != RaceManager::MINOR_MODE_FOLLOW_LEADER)
|
if (m_minor == RaceManager::MINOR_MODE_NORMAL_RACE)
|
||||||
{
|
description = _("Normal Race (Grand Prix)");
|
||||||
//I18N: number of laps to race in a challenge
|
else if (m_minor == RaceManager::MINOR_MODE_TIME_TRIAL)
|
||||||
description += _("Laps: %i", m_num_laps);
|
description = _("Time-Trial (Grand Prix)");
|
||||||
description += core::stringw(L"\n");
|
|
||||||
}
|
}
|
||||||
else
|
else if (!m_track_id.empty())
|
||||||
{
|
{
|
||||||
// Follow the leader mode:
|
if (m_is_ghost_replay)
|
||||||
description = _("Follow the leader");
|
description = _("Time-Trial - beat the replay");
|
||||||
|
else if (m_minor == RaceManager::MINOR_MODE_NORMAL_RACE)
|
||||||
|
description = _("Normal Race (single race)");
|
||||||
|
else if (m_minor == RaceManager::MINOR_MODE_TIME_TRIAL)
|
||||||
|
description = _("Time-Trial (single race)");
|
||||||
|
else if (m_minor == RaceManager::MINOR_MODE_FOLLOW_LEADER)
|
||||||
|
description = _("Follow the Leader (single race)");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_reverse == true)
|
if (m_reverse == true)
|
||||||
{
|
{
|
||||||
description += _("Reverse");
|
description += core::stringw(L"\n");
|
||||||
}
|
description += _("Mode: Reverse");
|
||||||
}
|
}
|
||||||
return description;
|
return description;
|
||||||
} // getChallengeDescription
|
} // getChallengeDescription
|
||||||
|
@ -532,14 +532,6 @@ void RaceGUIOverworld::drawGlobalMiniMap()
|
|||||||
gui::ScalableFont* font = GUIEngine::getTitleFont();
|
gui::ScalableFont* font = GUIEngine::getTitleFont();
|
||||||
font->draw(translations->fribidize(gp->getName()), pos, video::SColor(255,255,255,255),
|
font->draw(translations->fribidize(gp->getName()), pos, video::SColor(255,255,255,255),
|
||||||
false, true /* vcenter */, NULL);
|
false, true /* vcenter */, NULL);
|
||||||
|
|
||||||
core::rect<s32> pos2(pos);
|
|
||||||
pos2.UpperLeftCorner.Y += 10 + GUIEngine::getTitleFontHeight();
|
|
||||||
pos2.LowerRightCorner.Y += 10 + GUIEngine::getTitleFontHeight();
|
|
||||||
|
|
||||||
//just below GP name
|
|
||||||
font->draw(_("Type: Grand Prix"), pos2, video::SColor(255,255,255,255),
|
|
||||||
false, true /* vcenter */, NULL);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -567,17 +559,21 @@ void RaceGUIOverworld::drawGlobalMiniMap()
|
|||||||
m_active_challenge = challenge;
|
m_active_challenge = challenge;
|
||||||
m_challenge_description = challenge->getChallengeDescription();
|
m_challenge_description = challenge->getChallengeDescription();
|
||||||
}
|
}
|
||||||
GUIEngine::getFont()->draw(m_challenge_description,
|
|
||||||
pos, video::SColor(255,255,255,255),
|
gui::ScalableFont* font = GUIEngine::getLargeFont();
|
||||||
|
//FIXME : large font is upscaled and blurry
|
||||||
|
font->setBlackBorder(true);
|
||||||
|
font->draw(m_challenge_description, pos, video::SColor(255,255,255,255),
|
||||||
false, false /* vcenter */, NULL);
|
false, false /* vcenter */, NULL);
|
||||||
|
|
||||||
core::rect<s32> pos2(0,
|
core::rect<s32> pos2(0,
|
||||||
irr_driver->getActualScreenSize().Height - GUIEngine::getFontHeight()*2,
|
irr_driver->getActualScreenSize().Height - GUIEngine::getFontHeight()*2,
|
||||||
irr_driver->getActualScreenSize().Width,
|
irr_driver->getActualScreenSize().Width,
|
||||||
irr_driver->getActualScreenSize().Height);
|
irr_driver->getActualScreenSize().Height);
|
||||||
GUIEngine::getOutlineFont()->draw(_("Press fire to start the challenge"), pos2,
|
font->draw(_("Press fire to start the challenge"), pos2,
|
||||||
GUIEngine::getSkin()->getColor("font::normal"),
|
GUIEngine::getSkin()->getColor("font::normal"),
|
||||||
true, true /* vcenter */, NULL);
|
true, true /* vcenter */, NULL);
|
||||||
|
font->setBlackBorder(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user