1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Merge pull request #395 from FeniksFire/update

Adding simple background for quick recruitment window
This commit is contained in:
Alexander Shishkin
2017-12-23 16:30:51 +03:00
committed by GitHub
3 changed files with 6 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@@ -36,7 +36,7 @@ void CreaturePurchaseCard::initMinButton()
void CreaturePurchaseCard::initCreatureSwitcherButton() void CreaturePurchaseCard::initCreatureSwitcherButton()
{ {
creatureSwitcher = std::make_shared<CButton>(Point(pos.x + 20, pos.y-33), "iDv6432.def", CButton::tooltip(), [&](){ switchCreatureLevel(); }); creatureSwitcher = std::make_shared<CButton>(Point(pos.x + 18, pos.y-37), "iDv6432.def", CButton::tooltip(), [&](){ switchCreatureLevel(); });
} }
void CreaturePurchaseCard::switchCreatureLevel() void CreaturePurchaseCard::switchCreatureLevel()
@@ -52,8 +52,8 @@ void CreaturePurchaseCard::switchCreatureLevel()
void CreaturePurchaseCard::initAmountInfo() void CreaturePurchaseCard::initAmountInfo()
{ {
availableAmount = std::make_shared<CLabel>(pos.x + 27, pos.y + 146, FONT_SMALL, CENTER, Colors::YELLOW); availableAmount = std::make_shared<CLabel>(pos.x + 24, pos.y + 144, FONT_SMALL, CENTER, Colors::YELLOW);
purhaseAmount = std::make_shared<CLabel>(pos.x + 77, pos.y + 146, FONT_SMALL, CENTER, Colors::WHITE); purhaseAmount = std::make_shared<CLabel>(pos.x + 77, pos.y + 144, FONT_SMALL, CENTER, Colors::WHITE);
updateAmountInfo(0); updateAmountInfo(0);
} }
@@ -70,7 +70,7 @@ void CreaturePurchaseCard::initSlider()
void CreaturePurchaseCard::initCostBox() void CreaturePurchaseCard::initCostBox()
{ {
cost = std::make_shared<CreatureCostBox>(Rect(pos.x, pos.y + 194, 97, 74), ""); cost = std::make_shared<CreatureCostBox>(Rect(pos.x+2, pos.y + 194, 97, 74), "");
cost->createItems(creatureOnTheCard->cost); cost->createItems(creatureOnTheCard->cost);
} }
@@ -95,6 +95,7 @@ CreaturePurchaseCard::CreaturePurchaseCard(const std::vector<CreatureID> & creat
void CreaturePurchaseCard::initView() void CreaturePurchaseCard::initView()
{ {
picture = std::make_shared<CCreaturePic>(pos.x, pos.y, creatureOnTheCard); picture = std::make_shared<CCreaturePic>(pos.x, pos.y, creatureOnTheCard);
background = std::make_shared<CPicture>("QuickRecruitmentWindow/CreaturePurchaseCard.png", pos.x-4, pos.y-50);
initAmountInfo(); initAmountInfo();
initSlider(); initSlider();
initButtons(); initButtons();

View File

@@ -47,4 +47,5 @@ private:
std::shared_ptr<CCreaturePic> picture; std::shared_ptr<CCreaturePic> picture;
std::shared_ptr<CreatureCostBox> cost; std::shared_ptr<CreatureCostBox> cost;
std::vector<CreatureID> upgradesID; std::vector<CreatureID> upgradesID;
std::shared_ptr<CPicture> background;
}; };