mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
New quests work
This commit is contained in:
@@ -149,7 +149,7 @@ void CQuestLog::recreateLabelList()
|
||||
for (int i = 0; i < quests.size(); ++i)
|
||||
{
|
||||
// Quests with MISSION_NONE type don't have text for them and can't be displayed
|
||||
if (quests[i].quest->missionType == CQuest::MISSION_NONE)
|
||||
if (quests[i].quest->questName == CQuest::missionName(0))
|
||||
continue;
|
||||
|
||||
if (quests[i].quest->progress == CQuest::COMPLETE)
|
||||
@@ -236,7 +236,7 @@ void CQuestLog::selectQuest(int which, int labelId)
|
||||
|
||||
MetaString text;
|
||||
std::vector<Component> components;
|
||||
currentQuest->quest->getVisitText (text, components, currentQuest->quest->isCustomFirst, true);
|
||||
currentQuest->quest->getVisitText(text, components, true);
|
||||
if(description->slider)
|
||||
description->slider->scrollToMin(); // scroll text to start position
|
||||
description->setText(text.toString()); //TODO: use special log entry text
|
||||
@@ -247,9 +247,15 @@ void CQuestLog::selectQuest(int which, int labelId)
|
||||
int descriptionHeight = DESCRIPTION_HEIGHT_MAX;
|
||||
if(componentsSize)
|
||||
{
|
||||
descriptionHeight -= 15;
|
||||
CComponent::ESize imageSize = CComponent::large;
|
||||
switch (currentQuest->quest->missionType)
|
||||
if (componentsSize > 4)
|
||||
{
|
||||
imageSize = CComponent::small; // Only small icons can be used for resources as 4+ icons take too much space
|
||||
descriptionHeight -= 155;
|
||||
}
|
||||
else
|
||||
descriptionHeight -= 130;
|
||||
/*switch (currentQuest->quest->missionType)
|
||||
{
|
||||
case CQuest::MISSION_ARMY:
|
||||
{
|
||||
@@ -285,7 +291,7 @@ void CQuestLog::selectQuest(int which, int labelId)
|
||||
default:
|
||||
descriptionHeight -= 115;
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
|
||||
OBJECT_CONSTRUCTION_CUSTOM_CAPTURING(255-DISPOSE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user