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
|
||||
{
|
||||
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)
|
||||
{
|
||||
//I18N: number of laps to race in a challenge
|
||||
description += _("Laps: %i", m_num_laps);
|
||||
description += core::stringw(L"\n");
|
||||
if (m_minor == RaceManager::MINOR_MODE_NORMAL_RACE)
|
||||
description = _("Normal Race (Grand Prix)");
|
||||
else if (m_minor == RaceManager::MINOR_MODE_TIME_TRIAL)
|
||||
description = _("Time-Trial (Grand Prix)");
|
||||
}
|
||||
else
|
||||
else if (!m_track_id.empty())
|
||||
{
|
||||
// Follow the leader mode:
|
||||
description = _("Follow the leader");
|
||||
if (m_is_ghost_replay)
|
||||
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)
|
||||
{
|
||||
description += _("Reverse");
|
||||
}
|
||||
description += core::stringw(L"\n");
|
||||
description += _("Mode: Reverse");
|
||||
}
|
||||
return description;
|
||||
} // getChallengeDescription
|
||||
|
@ -532,14 +532,6 @@ void RaceGUIOverworld::drawGlobalMiniMap()
|
||||
gui::ScalableFont* font = GUIEngine::getTitleFont();
|
||||
font->draw(translations->fribidize(gp->getName()), pos, video::SColor(255,255,255,255),
|
||||
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
|
||||
{
|
||||
@ -567,17 +559,21 @@ void RaceGUIOverworld::drawGlobalMiniMap()
|
||||
m_active_challenge = challenge;
|
||||
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);
|
||||
|
||||
core::rect<s32> pos2(0,
|
||||
irr_driver->getActualScreenSize().Height - GUIEngine::getFontHeight()*2,
|
||||
irr_driver->getActualScreenSize().Width,
|
||||
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"),
|
||||
true, true /* vcenter */, NULL);
|
||||
font->setBlackBorder(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user