|
@@ -212,15 +212,15 @@ CRecruitmentWindow::CRecruitmentWindow(const CGDwelling * Dwelling, int Level, c
|
|
|
buyButton = std::make_shared<CButton>(Point(212, 313), "IBY6432.DEF", CGI->generaltexth->zelp[554], std::bind(&CRecruitmentWindow::buy, this), SDLK_RETURN);
|
|
buyButton = std::make_shared<CButton>(Point(212, 313), "IBY6432.DEF", CGI->generaltexth->zelp[554], std::bind(&CRecruitmentWindow::buy, this), SDLK_RETURN);
|
|
|
cancelButton = std::make_shared<CButton>(Point(290, 313), "ICN6432.DEF", CGI->generaltexth->zelp[555], std::bind(&CRecruitmentWindow::close, this), SDLK_ESCAPE);
|
|
cancelButton = std::make_shared<CButton>(Point(290, 313), "ICN6432.DEF", CGI->generaltexth->zelp[555], std::bind(&CRecruitmentWindow::close, this), SDLK_ESCAPE);
|
|
|
|
|
|
|
|
- title = std::make_shared<CLabel>(243, 32, FONT_BIG, CENTER, Colors::YELLOW);
|
|
|
|
|
- availableValue = std::make_shared<CLabel>(205, 253, FONT_SMALL, CENTER, Colors::WHITE);
|
|
|
|
|
- toRecruitValue = std::make_shared<CLabel>(279, 253, FONT_SMALL, CENTER, Colors::WHITE);
|
|
|
|
|
|
|
+ title = std::make_shared<CLabel>(243, 32, FONT_BIG, ETextAlignment::CENTER, Colors::YELLOW);
|
|
|
|
|
+ availableValue = std::make_shared<CLabel>(205, 253, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE);
|
|
|
|
|
+ toRecruitValue = std::make_shared<CLabel>(279, 253, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE);
|
|
|
|
|
|
|
|
costPerTroopValue = std::make_shared<CreatureCostBox>(Rect(65, 222, 97, 74), CGI->generaltexth->allTexts[346]);
|
|
costPerTroopValue = std::make_shared<CreatureCostBox>(Rect(65, 222, 97, 74), CGI->generaltexth->allTexts[346]);
|
|
|
totalCostValue = std::make_shared<CreatureCostBox>(Rect(323, 222, 97, 74), CGI->generaltexth->allTexts[466]);
|
|
totalCostValue = std::make_shared<CreatureCostBox>(Rect(323, 222, 97, 74), CGI->generaltexth->allTexts[466]);
|
|
|
|
|
|
|
|
- availableTitle = std::make_shared<CLabel>(205, 233, FONT_SMALL, CENTER, Colors::WHITE, CGI->generaltexth->allTexts[465]);
|
|
|
|
|
- toRecruitTitle = std::make_shared<CLabel>(279, 233, FONT_SMALL, CENTER, Colors::WHITE, CGI->generaltexth->allTexts[16]);
|
|
|
|
|
|
|
+ availableTitle = std::make_shared<CLabel>(205, 233, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE, CGI->generaltexth->allTexts[465]);
|
|
|
|
|
+ toRecruitTitle = std::make_shared<CLabel>(279, 233, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE, CGI->generaltexth->allTexts[16]);
|
|
|
|
|
|
|
|
availableCreaturesChanged();
|
|
availableCreaturesChanged();
|
|
|
}
|
|
}
|
|
@@ -333,7 +333,7 @@ CSplitWindow::CSplitWindow(const CCreature * creature, std::function<void(int, i
|
|
|
|
|
|
|
|
std::string titleStr = CGI->generaltexth->allTexts[256];
|
|
std::string titleStr = CGI->generaltexth->allTexts[256];
|
|
|
boost::algorithm::replace_first(titleStr,"%s", creature->namePl);
|
|
boost::algorithm::replace_first(titleStr,"%s", creature->namePl);
|
|
|
- title = std::make_shared<CLabel>(150, 34, FONT_BIG, CENTER, Colors::YELLOW, titleStr);
|
|
|
|
|
|
|
+ title = std::make_shared<CLabel>(150, 34, FONT_BIG, ETextAlignment::CENTER, Colors::YELLOW, titleStr);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void CSplitWindow::setAmountText(std::string text, bool left)
|
|
void CSplitWindow::setAmountText(std::string text, bool left)
|
|
@@ -404,15 +404,15 @@ CLevelWindow::CLevelWindow(const CGHeroInstance * hero, PrimarySkill::PrimarySki
|
|
|
ok = std::make_shared<CButton>(Point(297, 413), "IOKAY", CButton::tooltip(), std::bind(&CLevelWindow::close, this), SDLK_RETURN);
|
|
ok = std::make_shared<CButton>(Point(297, 413), "IOKAY", CButton::tooltip(), std::bind(&CLevelWindow::close, this), SDLK_RETURN);
|
|
|
|
|
|
|
|
//%s has gained a level.
|
|
//%s has gained a level.
|
|
|
- mainTitle = std::make_shared<CLabel>(192, 33, FONT_MEDIUM, CENTER, Colors::WHITE, boost::str(boost::format(CGI->generaltexth->allTexts[444]) % hero->name));
|
|
|
|
|
|
|
+ mainTitle = std::make_shared<CLabel>(192, 33, FONT_MEDIUM, ETextAlignment::CENTER, Colors::WHITE, boost::str(boost::format(CGI->generaltexth->allTexts[444]) % hero->name));
|
|
|
|
|
|
|
|
//%s is now a level %d %s.
|
|
//%s is now a level %d %s.
|
|
|
- levelTitle = std::make_shared<CLabel>(192, 162, FONT_MEDIUM, CENTER, Colors::WHITE,
|
|
|
|
|
|
|
+ levelTitle = std::make_shared<CLabel>(192, 162, FONT_MEDIUM, ETextAlignment::CENTER, Colors::WHITE,
|
|
|
boost::str(boost::format(CGI->generaltexth->allTexts[445]) % hero->name % hero->level % hero->type->heroClass->name));
|
|
boost::str(boost::format(CGI->generaltexth->allTexts[445]) % hero->name % hero->level % hero->type->heroClass->name));
|
|
|
|
|
|
|
|
skillIcon = std::make_shared<CAnimImage>("PSKIL42", pskill, 0, 174, 190);
|
|
skillIcon = std::make_shared<CAnimImage>("PSKIL42", pskill, 0, 174, 190);
|
|
|
|
|
|
|
|
- skillValue = std::make_shared<CLabel>(192, 253, FONT_MEDIUM, CENTER, Colors::WHITE, CGI->generaltexth->primarySkillNames[pskill] + " +1");
|
|
|
|
|
|
|
+ skillValue = std::make_shared<CLabel>(192, 253, FONT_MEDIUM, ETextAlignment::CENTER, Colors::WHITE, CGI->generaltexth->primarySkillNames[pskill] + " +1");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -447,12 +447,12 @@ CSystemOptionsWindow::CSystemOptionsWindow()
|
|
|
onFullscreenChanged(settings.listen["video"]["fullscreen"])
|
|
onFullscreenChanged(settings.listen["video"]["fullscreen"])
|
|
|
{
|
|
{
|
|
|
OBJECT_CONSTRUCTION_CAPTURING(255-DISPOSE);
|
|
OBJECT_CONSTRUCTION_CAPTURING(255-DISPOSE);
|
|
|
- title = std::make_shared<CLabel>(242, 32, FONT_BIG, CENTER, Colors::YELLOW, CGI->generaltexth->allTexts[568]);
|
|
|
|
|
|
|
+ title = std::make_shared<CLabel>(242, 32, FONT_BIG, ETextAlignment::CENTER, Colors::YELLOW, CGI->generaltexth->allTexts[568]);
|
|
|
|
|
|
|
|
const JsonNode & texts = CGI->generaltexth->localizedTexts["systemOptions"];
|
|
const JsonNode & texts = CGI->generaltexth->localizedTexts["systemOptions"];
|
|
|
|
|
|
|
|
//left window section
|
|
//left window section
|
|
|
- leftGroup = std::make_shared<CLabelGroup>(FONT_MEDIUM, CENTER, Colors::YELLOW);
|
|
|
|
|
|
|
+ leftGroup = std::make_shared<CLabelGroup>(FONT_MEDIUM, ETextAlignment::CENTER, Colors::YELLOW);
|
|
|
leftGroup->add(122, 64, CGI->generaltexth->allTexts[569]);
|
|
leftGroup->add(122, 64, CGI->generaltexth->allTexts[569]);
|
|
|
leftGroup->add(122, 130, CGI->generaltexth->allTexts[570]);
|
|
leftGroup->add(122, 130, CGI->generaltexth->allTexts[570]);
|
|
|
leftGroup->add(122, 196, CGI->generaltexth->allTexts[571]);
|
|
leftGroup->add(122, 196, CGI->generaltexth->allTexts[571]);
|
|
@@ -461,7 +461,7 @@ CSystemOptionsWindow::CSystemOptionsWindow()
|
|
|
leftGroup->add(122, 412, CGI->generaltexth->allTexts[395]);
|
|
leftGroup->add(122, 412, CGI->generaltexth->allTexts[395]);
|
|
|
|
|
|
|
|
//right section
|
|
//right section
|
|
|
- rightGroup = std::make_shared<CLabelGroup>(FONT_MEDIUM, TOPLEFT, Colors::WHITE);
|
|
|
|
|
|
|
+ rightGroup = std::make_shared<CLabelGroup>(FONT_MEDIUM, ETextAlignment::TOPLEFT, Colors::WHITE);
|
|
|
rightGroup->add(282, 57, CGI->generaltexth->allTexts[572]);
|
|
rightGroup->add(282, 57, CGI->generaltexth->allTexts[572]);
|
|
|
rightGroup->add(282, 89, CGI->generaltexth->allTexts[573]);
|
|
rightGroup->add(282, 89, CGI->generaltexth->allTexts[573]);
|
|
|
rightGroup->add(282, 121, CGI->generaltexth->allTexts[574]);
|
|
rightGroup->add(282, 121, CGI->generaltexth->allTexts[574]);
|
|
@@ -555,7 +555,7 @@ CSystemOptionsWindow::CSystemOptionsWindow()
|
|
|
gameResButton = std::make_shared<CButton>(Point(28, 275),"buttons/resolution", CButton::tooltip(texts["resolutionButton"]), std::bind(&CSystemOptionsWindow::selectGameRes, this), SDLK_g);
|
|
gameResButton = std::make_shared<CButton>(Point(28, 275),"buttons/resolution", CButton::tooltip(texts["resolutionButton"]), std::bind(&CSystemOptionsWindow::selectGameRes, this), SDLK_g);
|
|
|
|
|
|
|
|
const auto & screenRes = settings["video"]["screenRes"];
|
|
const auto & screenRes = settings["video"]["screenRes"];
|
|
|
- gameResLabel = std::make_shared<CLabel>(170, 292, FONT_MEDIUM, CENTER, Colors::YELLOW, resolutionToString(screenRes["width"].Integer(), screenRes["height"].Integer()));
|
|
|
|
|
|
|
+ gameResLabel = std::make_shared<CLabel>(170, 292, FONT_MEDIUM, ETextAlignment::CENTER, Colors::YELLOW, resolutionToString(screenRes["width"].Integer(), screenRes["height"].Integer()));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void CSystemOptionsWindow::selectGameRes()
|
|
void CSystemOptionsWindow::selectGameRes()
|
|
@@ -666,11 +666,11 @@ CTavernWindow::CTavernWindow(const CGObjectInstance * TavernObj)
|
|
|
h1 = std::make_shared<HeroPortrait>(selected, 0, 72, 299, h[0]);
|
|
h1 = std::make_shared<HeroPortrait>(selected, 0, 72, 299, h[0]);
|
|
|
h2 = std::make_shared<HeroPortrait>(selected, 1, 162, 299, h[1]);
|
|
h2 = std::make_shared<HeroPortrait>(selected, 1, 162, 299, h[1]);
|
|
|
|
|
|
|
|
- title = std::make_shared<CLabel>(200, 35, FONT_BIG, CENTER, Colors::YELLOW, CGI->generaltexth->jktexts[37]);
|
|
|
|
|
- cost = std::make_shared<CLabel>(320, 328, FONT_SMALL, CENTER, Colors::WHITE, boost::lexical_cast<std::string>(GameConstants::HERO_GOLD_COST));
|
|
|
|
|
|
|
+ title = std::make_shared<CLabel>(200, 35, FONT_BIG, ETextAlignment::CENTER, Colors::YELLOW, CGI->generaltexth->jktexts[37]);
|
|
|
|
|
+ cost = std::make_shared<CLabel>(320, 328, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE, boost::lexical_cast<std::string>(GameConstants::HERO_GOLD_COST));
|
|
|
|
|
|
|
|
auto rumorText = boost::str(boost::format(CGI->generaltexth->allTexts[216]) % LOCPLINT->cb->getTavernRumor(tavernObj));
|
|
auto rumorText = boost::str(boost::format(CGI->generaltexth->allTexts[216]) % LOCPLINT->cb->getTavernRumor(tavernObj));
|
|
|
- rumor = std::make_shared<CTextBox>(rumorText, Rect(32, 190, 330, 68), 0, FONT_SMALL, CENTER, Colors::WHITE);
|
|
|
|
|
|
|
+ rumor = std::make_shared<CTextBox>(rumorText, Rect(32, 190, 330, 68), 0, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE);
|
|
|
|
|
|
|
|
statusbar = CGStatusBar::create(std::make_shared<CPicture>(*background, Rect(8, pos.h - 26, pos.w - 16, 19), 8, pos.h - 26));
|
|
statusbar = CGStatusBar::create(std::make_shared<CPicture>(*background, Rect(8, pos.h - 26, pos.w - 16, 19), 8, pos.h - 26));
|
|
|
cancel = std::make_shared<CButton>(Point(310, 428), "ICANCEL.DEF", CButton::tooltip(CGI->generaltexth->tavernInfo[7]), std::bind(&CTavernWindow::close, this), SDLK_ESCAPE);
|
|
cancel = std::make_shared<CButton>(Point(310, 428), "ICANCEL.DEF", CButton::tooltip(CGI->generaltexth->tavernInfo[7]), std::bind(&CTavernWindow::close, this), SDLK_ESCAPE);
|
|
@@ -1082,8 +1082,8 @@ CExchangeWindow::CExchangeWindow(ObjectInstanceID hero1, ObjectInstanceID hero2,
|
|
|
return boost::str(fmt);
|
|
return boost::str(fmt);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- titles[0] = std::make_shared<CLabel>(147, 25, FONT_SMALL, CENTER, Colors::WHITE, genTitle(heroInst[0]));
|
|
|
|
|
- titles[1] = std::make_shared<CLabel>(653, 25, FONT_SMALL, CENTER, Colors::WHITE, genTitle(heroInst[1]));
|
|
|
|
|
|
|
+ titles[0] = std::make_shared<CLabel>(147, 25, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE, genTitle(heroInst[0]));
|
|
|
|
|
+ titles[1] = std::make_shared<CLabel>(653, 25, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE, genTitle(heroInst[1]));
|
|
|
|
|
|
|
|
auto PSKIL32 = std::make_shared<CAnimation>("PSKIL32");
|
|
auto PSKIL32 = std::make_shared<CAnimation>("PSKIL32");
|
|
|
PSKIL32->preload();
|
|
PSKIL32->preload();
|
|
@@ -1105,7 +1105,7 @@ CExchangeWindow::CExchangeWindow(ObjectInstanceID hero1, ObjectInstanceID hero2,
|
|
|
herosWArt[leftRight] = std::make_shared<CHeroWithMaybePickedArtifact>(this, hero);
|
|
herosWArt[leftRight] = std::make_shared<CHeroWithMaybePickedArtifact>(this, hero);
|
|
|
|
|
|
|
|
for(int m=0; m<GameConstants::PRIMARY_SKILLS; ++m)
|
|
for(int m=0; m<GameConstants::PRIMARY_SKILLS; ++m)
|
|
|
- primSkillValues[leftRight].push_back(std::make_shared<CLabel>(352 + (qeLayout ? 96 : 93) * leftRight, (qeLayout ? 22 : 35) + (qeLayout ? 26 : 36) * m, FONT_SMALL, CENTER, Colors::WHITE));
|
|
|
|
|
|
|
+ primSkillValues[leftRight].push_back(std::make_shared<CLabel>(352 + (qeLayout ? 96 : 93) * leftRight, (qeLayout ? 22 : 35) + (qeLayout ? 26 : 36) * m, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE));
|
|
|
|
|
|
|
|
|
|
|
|
|
for(int m=0; m < hero->secSkills.size(); ++m)
|
|
for(int m=0; m < hero->secSkills.size(); ++m)
|
|
@@ -1114,10 +1114,10 @@ CExchangeWindow::CExchangeWindow(ObjectInstanceID hero1, ObjectInstanceID hero2,
|
|
|
specImages[leftRight] = std::make_shared<CAnimImage>("UN32", hero->type->imageIndex, 0, 67 + 490 * leftRight, qeLayout ? 41 : 45);
|
|
specImages[leftRight] = std::make_shared<CAnimImage>("UN32", hero->type->imageIndex, 0, 67 + 490 * leftRight, qeLayout ? 41 : 45);
|
|
|
|
|
|
|
|
expImages[leftRight] = std::make_shared<CAnimImage>(PSKIL32, 4, 0, 103 + 490 * leftRight, qeLayout ? 41 : 45);
|
|
expImages[leftRight] = std::make_shared<CAnimImage>(PSKIL32, 4, 0, 103 + 490 * leftRight, qeLayout ? 41 : 45);
|
|
|
- expValues[leftRight] = std::make_shared<CLabel>(119 + 490 * leftRight, qeLayout ? 66 : 71, FONT_SMALL, CENTER, Colors::WHITE);
|
|
|
|
|
|
|
+ expValues[leftRight] = std::make_shared<CLabel>(119 + 490 * leftRight, qeLayout ? 66 : 71, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE);
|
|
|
|
|
|
|
|
manaImages[leftRight] = std::make_shared<CAnimImage>(PSKIL32, 5, 0, 139 + 490 * leftRight, qeLayout ? 41 : 45);
|
|
manaImages[leftRight] = std::make_shared<CAnimImage>(PSKIL32, 5, 0, 139 + 490 * leftRight, qeLayout ? 41 : 45);
|
|
|
- manaValues[leftRight] = std::make_shared<CLabel>(155 + 490 * leftRight, qeLayout ? 66 : 71, FONT_SMALL, CENTER, Colors::WHITE);
|
|
|
|
|
|
|
+ manaValues[leftRight] = std::make_shared<CLabel>(155 + 490 * leftRight, qeLayout ? 66 : 71, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
portraits[0] = std::make_shared<CAnimImage>("PortraitsLarge", heroInst[0]->portrait, 0, 257, 13);
|
|
portraits[0] = std::make_shared<CAnimImage>("PortraitsLarge", heroInst[0]->portrait, 0, 257, 13);
|
|
@@ -1316,8 +1316,8 @@ CShipyardWindow::CShipyardWindow(const std::vector<si32> & cost, int state, int
|
|
|
std::string goldValue = boost::lexical_cast<std::string>(cost[Res::GOLD]);
|
|
std::string goldValue = boost::lexical_cast<std::string>(cost[Res::GOLD]);
|
|
|
std::string woodValue = boost::lexical_cast<std::string>(cost[Res::WOOD]);
|
|
std::string woodValue = boost::lexical_cast<std::string>(cost[Res::WOOD]);
|
|
|
|
|
|
|
|
- goldCost = std::make_shared<CLabel>(118, 294, FONT_SMALL, CENTER, Colors::WHITE, goldValue);
|
|
|
|
|
- woodCost = std::make_shared<CLabel>(212, 294, FONT_SMALL, CENTER, Colors::WHITE, woodValue);
|
|
|
|
|
|
|
+ goldCost = std::make_shared<CLabel>(118, 294, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE, goldValue);
|
|
|
|
|
+ woodCost = std::make_shared<CLabel>(212, 294, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE, woodValue);
|
|
|
|
|
|
|
|
goldPic = std::make_shared<CAnimImage>("RESOURCE", Res::GOLD, 0, 100, 244);
|
|
goldPic = std::make_shared<CAnimImage>("RESOURCE", Res::GOLD, 0, 100, 244);
|
|
|
woodPic = std::make_shared<CAnimImage>("RESOURCE", Res::WOOD, 0, 196, 244);
|
|
woodPic = std::make_shared<CAnimImage>("RESOURCE", Res::WOOD, 0, 196, 244);
|
|
@@ -1337,8 +1337,8 @@ CShipyardWindow::CShipyardWindow(const std::vector<si32> & cost, int state, int
|
|
|
|
|
|
|
|
statusbar = CGStatusBar::create(std::make_shared<CPicture>(*background, Rect(8, pos.h - 26, pos.w - 16, 19), 8, pos.h - 26));
|
|
statusbar = CGStatusBar::create(std::make_shared<CPicture>(*background, Rect(8, pos.h - 26, pos.w - 16, 19), 8, pos.h - 26));
|
|
|
|
|
|
|
|
- title = std::make_shared<CLabel>(164, 27, FONT_BIG, CENTER, Colors::YELLOW, CGI->generaltexth->jktexts[13]);
|
|
|
|
|
- costLabel = std::make_shared<CLabel>(164, 220, FONT_MEDIUM, CENTER, Colors::WHITE, CGI->generaltexth->jktexts[14]);
|
|
|
|
|
|
|
+ title = std::make_shared<CLabel>(164, 27, FONT_BIG, ETextAlignment::CENTER, Colors::YELLOW, CGI->generaltexth->jktexts[13]);
|
|
|
|
|
+ costLabel = std::make_shared<CLabel>(164, 220, FONT_MEDIUM, ETextAlignment::CENTER, Colors::WHITE, CGI->generaltexth->jktexts[14]);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
CPuzzleWindow::CPuzzleWindow(const int3 & GrailPos, double discoveredRatio)
|
|
CPuzzleWindow::CPuzzleWindow(const int3 & GrailPos, double discoveredRatio)
|
|
@@ -1355,7 +1355,7 @@ CPuzzleWindow::CPuzzleWindow(const int3 & GrailPos, double discoveredRatio)
|
|
|
quitb->setBorderColor(Colors::METALLIC_GOLD);
|
|
quitb->setBorderColor(Colors::METALLIC_GOLD);
|
|
|
|
|
|
|
|
logo = std::make_shared<CPicture>("PUZZLOGO", 607, 3);
|
|
logo = std::make_shared<CPicture>("PUZZLOGO", 607, 3);
|
|
|
- title = std::make_shared<CLabel>(700, 95, FONT_BIG, CENTER, Colors::YELLOW, CGI->generaltexth->allTexts[463]);
|
|
|
|
|
|
|
+ title = std::make_shared<CLabel>(700, 95, FONT_BIG, ETextAlignment::CENTER, Colors::YELLOW, CGI->generaltexth->allTexts[463]);
|
|
|
resDataBar = std::make_shared<CResDataBar>("ARESBAR.bmp", 3, 575, 32, 2, 85, 85);
|
|
resDataBar = std::make_shared<CResDataBar>("ARESBAR.bmp", 3, 575, 32, 2, 85, 85);
|
|
|
|
|
|
|
|
int faction = LOCPLINT->cb->getStartInfo()->playerInfos.find(LOCPLINT->playerID)->second.castle;
|
|
int faction = LOCPLINT->cb->getStartInfo()->playerInfos.find(LOCPLINT->playerID)->second.castle;
|
|
@@ -1452,7 +1452,7 @@ CTransformerWindow::CItem::CItem(CTransformerWindow * parent_, int size_, int id
|
|
|
pos.x += 45 + (id%3)*83 + id/6*83;
|
|
pos.x += 45 + (id%3)*83 + id/6*83;
|
|
|
pos.y += 109 + (id/3)*98;
|
|
pos.y += 109 + (id/3)*98;
|
|
|
icon = std::make_shared<CAnimImage>("TWCRPORT", parent->army->getCreature(SlotID(id))->idNumber + 2);
|
|
icon = std::make_shared<CAnimImage>("TWCRPORT", parent->army->getCreature(SlotID(id))->idNumber + 2);
|
|
|
- count = std::make_shared<CLabel>(28, 76,FONT_SMALL, CENTER, Colors::WHITE, boost::lexical_cast<std::string>(size));
|
|
|
|
|
|
|
+ count = std::make_shared<CLabel>(28, 76,FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE, boost::lexical_cast<std::string>(size));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void CTransformerWindow::makeDeal()
|
|
void CTransformerWindow::makeDeal()
|
|
@@ -1502,10 +1502,10 @@ CTransformerWindow::CTransformerWindow(const CGHeroInstance * _hero, const CGTow
|
|
|
cancel = std::make_shared<CButton>(Point(392, 416), "ICANCEL.DEF", CGI->generaltexth->zelp[592], [&](){ close(); },SDLK_ESCAPE);
|
|
cancel = std::make_shared<CButton>(Point(392, 416), "ICANCEL.DEF", CGI->generaltexth->zelp[592], [&](){ close(); },SDLK_ESCAPE);
|
|
|
statusbar = CGStatusBar::create(std::make_shared<CPicture>(*background, Rect(8, pos.h - 26, pos.w - 16, 19), 8, pos.h - 26));
|
|
statusbar = CGStatusBar::create(std::make_shared<CPicture>(*background, Rect(8, pos.h - 26, pos.w - 16, 19), 8, pos.h - 26));
|
|
|
|
|
|
|
|
- titleLeft = std::make_shared<CLabel>(153, 29,FONT_SMALL, CENTER, Colors::YELLOW, CGI->generaltexth->allTexts[485]);//holding area
|
|
|
|
|
- titleRight = std::make_shared<CLabel>(153+295, 29, FONT_SMALL, CENTER, Colors::YELLOW, CGI->generaltexth->allTexts[486]);//transformer
|
|
|
|
|
- helpLeft = std::make_shared<CTextBox>(CGI->generaltexth->allTexts[487], Rect(26, 56, 255, 40), 0, FONT_MEDIUM, CENTER, Colors::YELLOW);//move creatures to create skeletons
|
|
|
|
|
- helpRight = std::make_shared<CTextBox>(CGI->generaltexth->allTexts[488], Rect(320, 56, 255, 40), 0, FONT_MEDIUM, CENTER, Colors::YELLOW);//creatures here will become skeletons
|
|
|
|
|
|
|
+ titleLeft = std::make_shared<CLabel>(153, 29,FONT_SMALL, ETextAlignment::CENTER, Colors::YELLOW, CGI->generaltexth->allTexts[485]);//holding area
|
|
|
|
|
+ titleRight = std::make_shared<CLabel>(153+295, 29, FONT_SMALL, ETextAlignment::CENTER, Colors::YELLOW, CGI->generaltexth->allTexts[486]);//transformer
|
|
|
|
|
+ helpLeft = std::make_shared<CTextBox>(CGI->generaltexth->allTexts[487], Rect(26, 56, 255, 40), 0, FONT_MEDIUM, ETextAlignment::CENTER, Colors::YELLOW);//move creatures to create skeletons
|
|
|
|
|
+ helpRight = std::make_shared<CTextBox>(CGI->generaltexth->allTexts[488], Rect(320, 56, 255, 40), 0, FONT_MEDIUM, ETextAlignment::CENTER, Colors::YELLOW);//creatures here will become skeletons
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
CUniversityWindow::CItem::CItem(CUniversityWindow * _parent, int _ID, int X, int Y)
|
|
CUniversityWindow::CItem::CItem(CUniversityWindow * _parent, int _ID, int X, int Y)
|
|
@@ -1522,8 +1522,8 @@ CUniversityWindow::CItem::CItem(CUniversityWindow * _parent, int _ID, int X, int
|
|
|
|
|
|
|
|
icon = std::make_shared<CAnimImage>("SECSKILL", _ID * 3 + 3, 0);
|
|
icon = std::make_shared<CAnimImage>("SECSKILL", _ID * 3 + 3, 0);
|
|
|
|
|
|
|
|
- name = std::make_shared<CLabel>(22, -13, FONT_SMALL, CENTER, Colors::WHITE, CGI->skillh->skillName(ID));
|
|
|
|
|
- level = std::make_shared<CLabel>(22, 57, FONT_SMALL, CENTER, Colors::WHITE, CGI->generaltexth->levels[0]);
|
|
|
|
|
|
|
+ name = std::make_shared<CLabel>(22, -13, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE, CGI->skillh->skillName(ID));
|
|
|
|
|
+ level = std::make_shared<CLabel>(22, 57, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE, CGI->generaltexth->levels[0]);
|
|
|
|
|
|
|
|
pos.h = icon->pos.h;
|
|
pos.h = icon->pos.h;
|
|
|
pos.w = icon->pos.w;
|
|
pos.w = icon->pos.w;
|
|
@@ -1604,8 +1604,8 @@ CUniversityWindow::CUniversityWindow(const CGHeroInstance * _hero, const IMarket
|
|
|
|
|
|
|
|
titlePic->center(Point(232 + pos.x, 76 + pos.y));
|
|
titlePic->center(Point(232 + pos.x, 76 + pos.y));
|
|
|
|
|
|
|
|
- clerkSpeech = std::make_shared<CTextBox>(CGI->generaltexth->allTexts[603], Rect(24, 129, 413, 70), 0, FONT_SMALL, CENTER, Colors::WHITE);
|
|
|
|
|
- title = std::make_shared<CLabel>(231, 26, FONT_MEDIUM, CENTER, Colors::YELLOW, CGI->generaltexth->allTexts[602]);
|
|
|
|
|
|
|
+ clerkSpeech = std::make_shared<CTextBox>(CGI->generaltexth->allTexts[603], Rect(24, 129, 413, 70), 0, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE);
|
|
|
|
|
+ title = std::make_shared<CLabel>(231, 26, FONT_MEDIUM, ETextAlignment::CENTER, Colors::YELLOW, CGI->generaltexth->allTexts[602]);
|
|
|
|
|
|
|
|
std::vector<int> goods = market->availableItemsIds(EMarketMode::RESOURCE_SKILL);
|
|
std::vector<int> goods = market->availableItemsIds(EMarketMode::RESOURCE_SKILL);
|
|
|
assert(goods.size() == 4);
|
|
assert(goods.size() == 4);
|
|
@@ -1634,14 +1634,14 @@ CUnivConfirmWindow::CUnivConfirmWindow(CUniversityWindow * owner_, int SKILL, bo
|
|
|
boost::replace_first(text, "%s", CGI->skillh->skillName(SKILL));
|
|
boost::replace_first(text, "%s", CGI->skillh->skillName(SKILL));
|
|
|
boost::replace_first(text, "%d", "2000");
|
|
boost::replace_first(text, "%d", "2000");
|
|
|
|
|
|
|
|
- clerkSpeech = std::make_shared<CTextBox>(text, Rect(24, 129, 413, 70), 0, FONT_SMALL, CENTER, Colors::WHITE);
|
|
|
|
|
|
|
+ clerkSpeech = std::make_shared<CTextBox>(text, Rect(24, 129, 413, 70), 0, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE);
|
|
|
|
|
|
|
|
- name = std::make_shared<CLabel>(230, 37, FONT_SMALL, CENTER, Colors::WHITE, CGI->skillh->skillName(SKILL));
|
|
|
|
|
|
|
+ name = std::make_shared<CLabel>(230, 37, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE, CGI->skillh->skillName(SKILL));
|
|
|
icon = std::make_shared<CAnimImage>("SECSKILL", SKILL*3+3, 0, 211, 51);
|
|
icon = std::make_shared<CAnimImage>("SECSKILL", SKILL*3+3, 0, 211, 51);
|
|
|
- level = std::make_shared<CLabel>(230, 107, FONT_SMALL, CENTER, Colors::WHITE, CGI->generaltexth->levels[1]);
|
|
|
|
|
|
|
+ level = std::make_shared<CLabel>(230, 107, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE, CGI->generaltexth->levels[1]);
|
|
|
|
|
|
|
|
costIcon = std::make_shared<CAnimImage>("RESOURCE", Res::GOLD, 0, 210, 210);
|
|
costIcon = std::make_shared<CAnimImage>("RESOURCE", Res::GOLD, 0, 210, 210);
|
|
|
- cost = std::make_shared<CLabel>(230, 267, FONT_SMALL, CENTER, Colors::WHITE, "2000");
|
|
|
|
|
|
|
+ cost = std::make_shared<CLabel>(230, 267, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE, "2000");
|
|
|
|
|
|
|
|
std::string hoverText = CGI->generaltexth->allTexts[609];
|
|
std::string hoverText = CGI->generaltexth->allTexts[609];
|
|
|
boost::replace_first(hoverText, "%s", CGI->generaltexth->levels[0]+ " " + CGI->skillh->skillName(SKILL));
|
|
boost::replace_first(hoverText, "%s", CGI->generaltexth->levels[0]+ " " + CGI->skillh->skillName(SKILL));
|
|
@@ -1694,7 +1694,7 @@ CGarrisonWindow::CGarrisonWindow(const CArmedInstance * up, const CGHeroInstance
|
|
|
logGlobal->error("Invalid armed instance for garrison window.");
|
|
logGlobal->error("Invalid armed instance for garrison window.");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- title = std::make_shared<CLabel>(275, 30, FONT_BIG, CENTER, Colors::YELLOW, titleText);
|
|
|
|
|
|
|
+ title = std::make_shared<CLabel>(275, 30, FONT_BIG, ETextAlignment::CENTER, Colors::YELLOW, titleText);
|
|
|
|
|
|
|
|
banner = std::make_shared<CAnimImage>("CREST58", up->getOwner().getNum(), 0, 28, 124);
|
|
banner = std::make_shared<CAnimImage>("CREST58", up->getOwner().getNum(), 0, 28, 124);
|
|
|
portrait = std::make_shared<CAnimImage>("PortraitsLarge", down->portrait, 0, 29, 222);
|
|
portrait = std::make_shared<CAnimImage>("PortraitsLarge", down->portrait, 0, 29, 222);
|
|
@@ -1712,14 +1712,14 @@ CHillFortWindow::CHillFortWindow(const CGHeroInstance * visitor, const CGObjectI
|
|
|
{
|
|
{
|
|
|
OBJECT_CONSTRUCTION_CAPTURING(255-DISPOSE);
|
|
OBJECT_CONSTRUCTION_CAPTURING(255-DISPOSE);
|
|
|
|
|
|
|
|
- title = std::make_shared<CLabel>(325, 32, FONT_BIG, CENTER, Colors::YELLOW, fort->getObjectName());
|
|
|
|
|
|
|
+ title = std::make_shared<CLabel>(325, 32, FONT_BIG, ETextAlignment::CENTER, Colors::YELLOW, fort->getObjectName());
|
|
|
|
|
|
|
|
heroPic = std::make_shared<CHeroArea>(30, 60, hero);
|
|
heroPic = std::make_shared<CHeroArea>(30, 60, hero);
|
|
|
|
|
|
|
|
for(int i=0; i < resCount; i++)
|
|
for(int i=0; i < resCount; i++)
|
|
|
{
|
|
{
|
|
|
totalIcons[i] = std::make_shared<CAnimImage>("SMALRES", i, 0, 104 + 76 * i, 237);
|
|
totalIcons[i] = std::make_shared<CAnimImage>("SMALRES", i, 0, 104 + 76 * i, 237);
|
|
|
- totalLabels[i] = std::make_shared<CLabel>(166 + 76 * i, 253, FONT_SMALL, BOTTOMRIGHT);
|
|
|
|
|
|
|
+ totalLabels[i] = std::make_shared<CLabel>(166 + 76 * i, 253, FONT_SMALL, ETextAlignment::BOTTOMRIGHT);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
for(int i = 0; i < slotsCount; i++)
|
|
for(int i = 0; i < slotsCount; i++)
|
|
@@ -1731,7 +1731,7 @@ CHillFortWindow::CHillFortWindow(const CGHeroInstance * visitor, const CGObjectI
|
|
|
for(int j : {0,1})
|
|
for(int j : {0,1})
|
|
|
{
|
|
{
|
|
|
slotIcons[i][j] = std::make_shared<CAnimImage>("SMALRES", 0, 0, 104 + 76 * i, 128 + 20 * j);
|
|
slotIcons[i][j] = std::make_shared<CAnimImage>("SMALRES", 0, 0, 104 + 76 * i, 128 + 20 * j);
|
|
|
- slotLabels[i][j] = std::make_shared<CLabel>(168 + 76 * i, 144 + 20 * j, FONT_SMALL, BOTTOMRIGHT);
|
|
|
|
|
|
|
+ slotLabels[i][j] = std::make_shared<CLabel>(168 + 76 * i, 144 + 20 * j, FONT_SMALL, ETextAlignment::BOTTOMRIGHT);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1944,7 +1944,7 @@ CThievesGuildWindow::CThievesGuildWindow(const CGObjectInstance * _owner):
|
|
|
|
|
|
|
|
std::string text = CGI->generaltexth->jktexts[24+g];
|
|
std::string text = CGI->generaltexth->jktexts[24+g];
|
|
|
boost::algorithm::trim_if(text,boost::algorithm::is_any_of("\""));
|
|
boost::algorithm::trim_if(text,boost::algorithm::is_any_of("\""));
|
|
|
- rowHeaders.push_back(std::make_shared<CLabel>(135, y, FONT_MEDIUM, CENTER, Colors::YELLOW, text));
|
|
|
|
|
|
|
+ rowHeaders.push_back(std::make_shared<CLabel>(135, y, FONT_MEDIUM, ETextAlignment::CENTER, Colors::YELLOW, text));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
auto PRSTRIPS = std::make_shared<CAnimation>("PRSTRIPS");
|
|
auto PRSTRIPS = std::make_shared<CAnimation>("PRSTRIPS");
|
|
@@ -1954,7 +1954,7 @@ CThievesGuildWindow::CThievesGuildWindow(const CGObjectInstance * _owner):
|
|
|
columnBackgrounds.push_back(std::make_shared<CAnimImage>(PRSTRIPS, g-1, 0, 250 + 66*g, 7));
|
|
columnBackgrounds.push_back(std::make_shared<CAnimImage>(PRSTRIPS, g-1, 0, 250 + 66*g, 7));
|
|
|
|
|
|
|
|
for(int g=0; g<tgi.playerColors.size(); ++g)
|
|
for(int g=0; g<tgi.playerColors.size(); ++g)
|
|
|
- columnHeaders.push_back(std::make_shared<CLabel>(283 + 66*g, 24, FONT_BIG, CENTER, Colors::YELLOW, CGI->generaltexth->jktexts[16+g]));
|
|
|
|
|
|
|
+ columnHeaders.push_back(std::make_shared<CLabel>(283 + 66*g, 24, FONT_BIG, ETextAlignment::CENTER, Colors::YELLOW, CGI->generaltexth->jktexts[16+g]));
|
|
|
|
|
|
|
|
auto itgflags = std::make_shared<CAnimation>("itgflags");
|
|
auto itgflags = std::make_shared<CAnimation>("itgflags");
|
|
|
itgflags->preload();
|
|
itgflags->preload();
|
|
@@ -2003,11 +2003,11 @@ CThievesGuildWindow::CThievesGuildWindow(const CGObjectInstance * _owner):
|
|
|
if(iter.second.details)
|
|
if(iter.second.details)
|
|
|
{
|
|
{
|
|
|
primSkillHeaders.push_back(std::make_shared<CTextBox>(CGI->generaltexth->allTexts[184], Rect(260 + 66*counter, 396, 52, 64),
|
|
primSkillHeaders.push_back(std::make_shared<CTextBox>(CGI->generaltexth->allTexts[184], Rect(260 + 66*counter, 396, 52, 64),
|
|
|
- 0, FONT_TINY, TOPLEFT, Colors::WHITE));
|
|
|
|
|
|
|
+ 0, FONT_TINY, ETextAlignment::TOPLEFT, Colors::WHITE));
|
|
|
|
|
|
|
|
for(int i=0; i<iter.second.details->primskills.size(); ++i)
|
|
for(int i=0; i<iter.second.details->primskills.size(); ++i)
|
|
|
{
|
|
{
|
|
|
- primSkillValues.push_back(std::make_shared<CLabel>(310 + 66 * counter, 407 + 11*i, FONT_TINY, BOTTOMRIGHT, Colors::WHITE,
|
|
|
|
|
|
|
+ primSkillValues.push_back(std::make_shared<CLabel>(310 + 66 * counter, 407 + 11*i, FONT_TINY, ETextAlignment::BOTTOMRIGHT, Colors::WHITE,
|
|
|
boost::lexical_cast<std::string>(iter.second.details->primskills[i])));
|
|
boost::lexical_cast<std::string>(iter.second.details->primskills[i])));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -2038,7 +2038,7 @@ CThievesGuildWindow::CThievesGuildWindow(const CGObjectInstance * _owner):
|
|
|
text = CGI->generaltexth->arraytxt[168 + it.second];
|
|
text = CGI->generaltexth->arraytxt[168 + it.second];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- personalities.push_back(std::make_shared<CLabel>(283 + 66*counter, 459, FONT_SMALL, CENTER, Colors::WHITE, text));
|
|
|
|
|
|
|
+ personalities.push_back(std::make_shared<CLabel>(283 + 66*counter, 459, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE, text));
|
|
|
|
|
|
|
|
counter++;
|
|
counter++;
|
|
|
}
|
|
}
|
|
@@ -2055,7 +2055,7 @@ CObjectListWindow::CItem::CItem(CObjectListWindow * _parent, size_t _id, std::st
|
|
|
|
|
|
|
|
type |= REDRAW_PARENT;
|
|
type |= REDRAW_PARENT;
|
|
|
|
|
|
|
|
- text = std::make_shared<CLabel>(pos.w/2, pos.h/2, FONT_SMALL, CENTER, Colors::WHITE, _text);
|
|
|
|
|
|
|
+ text = std::make_shared<CLabel>(pos.w/2, pos.h/2, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE, _text);
|
|
|
select(index == parent->selected);
|
|
select(index == parent->selected);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -2108,8 +2108,8 @@ void CObjectListWindow::init(std::shared_ptr<CIntObject> titleWidget_, std::stri
|
|
|
{
|
|
{
|
|
|
titleWidget = titleWidget_;
|
|
titleWidget = titleWidget_;
|
|
|
|
|
|
|
|
- title = std::make_shared<CLabel>(152, 27, FONT_BIG, CENTER, Colors::YELLOW, _title);
|
|
|
|
|
- descr = std::make_shared<CLabel>(145, 133, FONT_SMALL, CENTER, Colors::WHITE, _descr);
|
|
|
|
|
|
|
+ title = std::make_shared<CLabel>(152, 27, FONT_BIG, ETextAlignment::CENTER, Colors::YELLOW, _title);
|
|
|
|
|
+ descr = std::make_shared<CLabel>(145, 133, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE, _descr);
|
|
|
exit = std::make_shared<CButton>( Point(228, 402), "ICANCEL.DEF", CButton::tooltip(), std::bind(&CObjectListWindow::exitPressed, this), SDLK_ESCAPE);
|
|
exit = std::make_shared<CButton>( Point(228, 402), "ICANCEL.DEF", CButton::tooltip(), std::bind(&CObjectListWindow::exitPressed, this), SDLK_ESCAPE);
|
|
|
|
|
|
|
|
if(titleWidget)
|
|
if(titleWidget)
|