diff --git a/Mods/vcmi/Data/QuickRecruitmentWindow/CreaturePurchaseCard.png b/Mods/vcmi/Data/QuickRecruitmentWindow/CreaturePurchaseCard.png new file mode 100644 index 000000000..9920a1ea2 Binary files /dev/null and b/Mods/vcmi/Data/QuickRecruitmentWindow/CreaturePurchaseCard.png differ diff --git a/client/windows/CreaturePurchaseCard.cpp b/client/windows/CreaturePurchaseCard.cpp index d01a7817a..a66a39714 100644 --- a/client/windows/CreaturePurchaseCard.cpp +++ b/client/windows/CreaturePurchaseCard.cpp @@ -36,7 +36,7 @@ void CreaturePurchaseCard::initMinButton() void CreaturePurchaseCard::initCreatureSwitcherButton() { - creatureSwitcher = std::make_shared(Point(pos.x + 20, pos.y-33), "iDv6432.def", CButton::tooltip(), [&](){ switchCreatureLevel(); }); + creatureSwitcher = std::make_shared(Point(pos.x + 18, pos.y-37), "iDv6432.def", CButton::tooltip(), [&](){ switchCreatureLevel(); }); } void CreaturePurchaseCard::switchCreatureLevel() @@ -52,8 +52,8 @@ void CreaturePurchaseCard::switchCreatureLevel() void CreaturePurchaseCard::initAmountInfo() { - availableAmount = std::make_shared(pos.x + 27, pos.y + 146, FONT_SMALL, CENTER, Colors::YELLOW); - purhaseAmount = std::make_shared(pos.x + 77, pos.y + 146, FONT_SMALL, CENTER, Colors::WHITE); + availableAmount = std::make_shared(pos.x + 24, pos.y + 144, FONT_SMALL, CENTER, Colors::YELLOW); + purhaseAmount = std::make_shared(pos.x + 77, pos.y + 144, FONT_SMALL, CENTER, Colors::WHITE); updateAmountInfo(0); } @@ -70,7 +70,7 @@ void CreaturePurchaseCard::initSlider() void CreaturePurchaseCard::initCostBox() { - cost = std::make_shared(Rect(pos.x, pos.y + 194, 97, 74), ""); + cost = std::make_shared(Rect(pos.x+2, pos.y + 194, 97, 74), ""); cost->createItems(creatureOnTheCard->cost); } @@ -95,6 +95,7 @@ CreaturePurchaseCard::CreaturePurchaseCard(const std::vector & creat void CreaturePurchaseCard::initView() { picture = std::make_shared(pos.x, pos.y, creatureOnTheCard); + background = std::make_shared("QuickRecruitmentWindow/CreaturePurchaseCard.png", pos.x-4, pos.y-50); initAmountInfo(); initSlider(); initButtons(); diff --git a/client/windows/CreaturePurchaseCard.h b/client/windows/CreaturePurchaseCard.h index 59d156512..91ce2b4bb 100644 --- a/client/windows/CreaturePurchaseCard.h +++ b/client/windows/CreaturePurchaseCard.h @@ -47,4 +47,5 @@ private: std::shared_ptr picture; std::shared_ptr cost; std::vector upgradesID; + std::shared_ptr background; };