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

Quest window now uses new background, using same gfx sources as creature window

This commit is contained in:
Ivan Savenko 2014-07-14 18:07:57 +03:00
parent a69fcdd435
commit 7f790f9d6a
2 changed files with 8 additions and 8 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 KiB

View File

@ -116,7 +116,7 @@ void CQuestMinimap::showAll(SDL_Surface * to)
}
CQuestLog::CQuestLog (const std::vector<QuestInfo> & Quests) :
CWindowObject(PLAYER_COLORED, "QuestLog.pcx"),
CWindowObject(PLAYER_COLORED | BORDERED, "questDialog.pcx"),
questIndex(0),
currentQuest(nullptr),
quests (Quests),
@ -128,12 +128,12 @@ CQuestLog::CQuestLog (const std::vector<QuestInfo> & Quests) :
void CQuestLog::init()
{
minimap = new CQuestMinimap (Rect (47, 33, 144, 144));
description = new CTextBox ("", Rect(245, 33, 350, 355), 1, FONT_MEDIUM, TOPLEFT, Colors::WHITE);
ok = new CAdventureMapButton("",CGI->generaltexth->zelp[445].second, boost::bind(&CQuestLog::close,this), 547, 401, "IOKAY.DEF", SDLK_RETURN);
minimap = new CQuestMinimap (Rect (33, 18, 144, 144));
description = new CTextBox ("", Rect(221, 18, 350, 355), 1, FONT_MEDIUM, TOPLEFT, Colors::WHITE);
ok = new CAdventureMapButton("",CGI->generaltexth->zelp[445].second, boost::bind(&CQuestLog::close,this), 533, 386, "IOKAY.DEF", SDLK_RETURN);
if (quests.size() > QUEST_COUNT)
slider = new CSlider(203, 199, 230, boost::bind (&CQuestLog::sliderMoved, this, _1), QUEST_COUNT, quests.size(), false, 0);
slider = new CSlider(189, 184, 230, boost::bind (&CQuestLog::sliderMoved, this, _1), QUEST_COUNT, quests.size(), false, 0);
for (int i = 0; i < quests.size(); ++i)
{
@ -141,7 +141,7 @@ void CQuestLog::init()
quests[i].quest->getRolloverText (text, false);
if (quests[i].obj)
text.addReplacement (quests[i].obj->getObjectName()); //get name of the object
CQuestLabel * label = new CQuestLabel (Rect(28, 199 + i * 24, 172,30), FONT_SMALL, TOPLEFT, Colors::WHITE, text.toString());
CQuestLabel * label = new CQuestLabel (Rect(14, 184 + i * 24, 172,30), FONT_SMALL, TOPLEFT, Colors::WHITE, text.toString());
label->callback = boost::bind(&CQuestLog::selectQuest, this, i);
labels.push_back(label);
}
@ -151,7 +151,7 @@ void CQuestLog::init()
void CQuestLog::showAll(SDL_Surface * to)
{
CIntObject::showAll (to);
CWindowObject::showAll (to);
for (auto label : labels)
{
label->show(to); //shows only if active
@ -169,7 +169,7 @@ void CQuestLog::recreateQuestList (int newpos)
{
for (int i = 0; i < labels.size(); ++i)
{
labels[i]->pos = Rect (pos.x + 28, pos.y + 207 + (i-newpos) * 25, 173, 23);
labels[i]->pos = Rect (pos.x + 14, pos.y + 192 + (i-newpos) * 25, 173, 23);
if (i >= newpos && i < newpos + QUEST_COUNT)
{
labels[i]->activate();