mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-21 21:17:49 +02:00
fix typo: purhase -> purchase
This commit is contained in:
parent
a320af837d
commit
81dec1405f
@ -1244,9 +1244,9 @@ void CCastleInterface::recreateIcons()
|
||||
hall = std::make_shared<CTownInfo>(80, 413, town, true);
|
||||
fort = std::make_shared<CTownInfo>(122, 413, town, false);
|
||||
|
||||
fastArmyPurhase = std::make_shared<CButton>(Point(122, 413), "itmcl.def", CButton::tooltip(), [&](){builds->enterToTheQuickRecruitmentWindow();});
|
||||
fastArmyPurhase->setImageOrder(town->fortLevel()-1, town->fortLevel()-1, town->fortLevel()-1, town->fortLevel()-1);
|
||||
fastArmyPurhase->setAnimateLonelyFrame(true);
|
||||
fastArmyPurchase = std::make_shared<CButton>(Point(122, 413), "itmcl.def", CButton::tooltip(), [&](){builds->enterToTheQuickRecruitmentWindow();});
|
||||
fastArmyPurchase->setImageOrder(town->fortLevel()-1, town->fortLevel()-1, town->fortLevel()-1, town->fortLevel()-1);
|
||||
fastArmyPurchase->setAnimateLonelyFrame(true);
|
||||
|
||||
creainfo.clear();
|
||||
|
||||
|
@ -209,7 +209,7 @@ class CCastleInterface : public CStatusbarWindow, public CGarrisonHolder
|
||||
|
||||
std::shared_ptr<CButton> exit;
|
||||
std::shared_ptr<CButton> split;
|
||||
std::shared_ptr<CButton> fastArmyPurhase;
|
||||
std::shared_ptr<CButton> fastArmyPurchase;
|
||||
|
||||
std::vector<std::shared_ptr<CCreaInfo>> creainfo;//small icons of creatures (bottom-left corner);
|
||||
|
||||
|
@ -54,14 +54,14 @@ void CreaturePurchaseCard::switchCreatureLevel()
|
||||
void CreaturePurchaseCard::initAmountInfo()
|
||||
{
|
||||
availableAmount = std::make_shared<CLabel>(pos.x + 25, pos.y + 146, FONT_SMALL, CENTER, Colors::YELLOW);
|
||||
purhaseAmount = std::make_shared<CLabel>(pos.x + 76, pos.y + 146, FONT_SMALL, CENTER, Colors::WHITE);
|
||||
purchaseAmount = std::make_shared<CLabel>(pos.x + 76, pos.y + 146, FONT_SMALL, CENTER, Colors::WHITE);
|
||||
updateAmountInfo(0);
|
||||
}
|
||||
|
||||
void CreaturePurchaseCard::updateAmountInfo(int value)
|
||||
{
|
||||
availableAmount->setText(boost::lexical_cast<std::string>(maxAmount-value));
|
||||
purhaseAmount->setText(boost::lexical_cast<std::string>(value));
|
||||
purchaseAmount->setText(boost::lexical_cast<std::string>(value));
|
||||
}
|
||||
|
||||
void CreaturePurchaseCard::initSlider()
|
||||
|
@ -43,7 +43,7 @@ private:
|
||||
void initCostBox();
|
||||
|
||||
std::shared_ptr<CButton> maxButton, minButton, creatureSwitcher;
|
||||
std::shared_ptr<CLabel> availableAmount, purhaseAmount;
|
||||
std::shared_ptr<CLabel> availableAmount, purchaseAmount;
|
||||
std::shared_ptr<CCreaturePic> picture;
|
||||
std::shared_ptr<CreatureCostBox> cost;
|
||||
std::vector<CreatureID> upgradesID;
|
||||
|
@ -35,7 +35,7 @@ void QuickRecruitmentWindow::setCancelButton()
|
||||
|
||||
void QuickRecruitmentWindow::setBuyButton()
|
||||
{
|
||||
buyButton = std::make_shared<CButton>(Point((pos.w/2)-32, 418), "IBY6432.DEF", CButton::tooltip(), [&](){ purhaseUnits(); }, SDLK_RETURN);
|
||||
buyButton = std::make_shared<CButton>(Point((pos.w/2)-32, 418), "IBY6432.DEF", CButton::tooltip(), [&](){ purchaseUnits(); }, SDLK_RETURN);
|
||||
cancelButton->assignedKeys.insert(SDLK_ESCAPE);
|
||||
buyButton->setImageOrder(0, 1, 2, 3);
|
||||
}
|
||||
@ -46,7 +46,7 @@ void QuickRecruitmentWindow::setMaxButton()
|
||||
maxButton->setImageOrder(0, 1, 2, 3);
|
||||
}
|
||||
|
||||
void QuickRecruitmentWindow::setCreaturePurhaseCards()
|
||||
void QuickRecruitmentWindow::setCreaturePurchaseCards()
|
||||
{
|
||||
int availableAmount = getAvailableCreatures();
|
||||
Point position = Point((pos.w - 100*availableAmount - 8*(availableAmount-1))/2,64);
|
||||
@ -99,7 +99,7 @@ void QuickRecruitmentWindow::maxAllCards(std::vector<std::shared_ptr<CreaturePur
|
||||
}
|
||||
|
||||
|
||||
void QuickRecruitmentWindow::purhaseUnits()
|
||||
void QuickRecruitmentWindow::purchaseUnits()
|
||||
{
|
||||
for(auto selected : cards)
|
||||
{
|
||||
@ -154,6 +154,6 @@ QuickRecruitmentWindow::QuickRecruitmentWindow(const CGTownInstance * townd, Rec
|
||||
|
||||
initWindow(startupPosition);
|
||||
setButtons();
|
||||
setCreaturePurhaseCards();
|
||||
setCreaturePurchaseCards();
|
||||
maxAllCards(cards);
|
||||
}
|
||||
|
@ -31,11 +31,11 @@ private:
|
||||
void setBuyButton();
|
||||
void setMaxButton();
|
||||
|
||||
void setCreaturePurhaseCards();
|
||||
void setCreaturePurchaseCards();
|
||||
|
||||
void maxAllCards(std::vector<std::shared_ptr<CreaturePurchaseCard>> cards);
|
||||
void maxAllSlidersAmount(std::vector<std::shared_ptr<CreaturePurchaseCard>> cards);
|
||||
void purhaseUnits();
|
||||
void purchaseUnits();
|
||||
|
||||
const CGTownInstance * town;
|
||||
std::shared_ptr<CButton> maxButton, buyButton, cancelButton;
|
||||
|
Loading…
x
Reference in New Issue
Block a user