1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Quest Log: implement support Seer names

This commit is contained in:
ArseniyShestakov 2015-02-16 00:44:48 +03:00
parent 9665c50f3f
commit df2894b798

View File

@ -144,7 +144,17 @@ void CQuestLog::init()
MetaString text;
quests[i].quest->getRolloverText (text, false);
if (quests[i].obj)
text.addReplacement (quests[i].obj->getObjectName()); //get name of the object
{
if (auto seersHut = dynamic_cast<const CGSeerHut *>(quests[i].obj))
{
MetaString toSeer;
toSeer << VLC->generaltexth->allTexts[347];
toSeer.addReplacement(seersHut->seerName);
text.addReplacement(toSeer.toString());
}
else
text.addReplacement(quests[i].obj->getObjectName()); //get name of the object
}
CQuestLabel * label = new CQuestLabel (Rect(13, 195, 149,31), FONT_SMALL, TOPLEFT, Colors::WHITE, text.toString());
label->disable();