浏览代码

Adding bacground for QuickRecruitmentWindow

Adding bacground for CreaturePurchaseCard in QuickRecruitmentWindow
FeniksFire 7 年之前
父节点
当前提交
bf4024c3ac

二进制
Mods/vcmi/Data/QuickRecruitmentWindow/CreaturePurchaseCard.png


+ 5 - 4
client/windows/CreaturePurchaseCard.cpp

@@ -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);
-	purhaseAmount = std::make_shared<CLabel>(pos.x + 77, pos.y + 146, FONT_SMALL, CENTER, Colors::WHITE);
+	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 + 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();

+ 1 - 0
client/windows/CreaturePurchaseCard.h

@@ -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;
 };
 };