1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-23 21:29:13 +02:00

fix typo: purhase -> purchase

This commit is contained in:
Andrey Filipenkov 2022-09-17 15:44:13 +03:00
parent a320af837d
commit 81dec1405f
6 changed files with 13 additions and 13 deletions

View File

@ -1244,9 +1244,9 @@ void CCastleInterface::recreateIcons()
hall = std::make_shared<CTownInfo>(80, 413, town, true); hall = std::make_shared<CTownInfo>(80, 413, town, true);
fort = std::make_shared<CTownInfo>(122, 413, town, false); fort = std::make_shared<CTownInfo>(122, 413, town, false);
fastArmyPurhase = std::make_shared<CButton>(Point(122, 413), "itmcl.def", CButton::tooltip(), [&](){builds->enterToTheQuickRecruitmentWindow();}); fastArmyPurchase = 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); fastArmyPurchase->setImageOrder(town->fortLevel()-1, town->fortLevel()-1, town->fortLevel()-1, town->fortLevel()-1);
fastArmyPurhase->setAnimateLonelyFrame(true); fastArmyPurchase->setAnimateLonelyFrame(true);
creainfo.clear(); creainfo.clear();

View File

@ -209,7 +209,7 @@ class CCastleInterface : public CStatusbarWindow, public CGarrisonHolder
std::shared_ptr<CButton> exit; std::shared_ptr<CButton> exit;
std::shared_ptr<CButton> split; 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); std::vector<std::shared_ptr<CCreaInfo>> creainfo;//small icons of creatures (bottom-left corner);

View File

@ -54,14 +54,14 @@ void CreaturePurchaseCard::switchCreatureLevel()
void CreaturePurchaseCard::initAmountInfo() void CreaturePurchaseCard::initAmountInfo()
{ {
availableAmount = std::make_shared<CLabel>(pos.x + 25, pos.y + 146, FONT_SMALL, CENTER, Colors::YELLOW); 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); updateAmountInfo(0);
} }
void CreaturePurchaseCard::updateAmountInfo(int value) void CreaturePurchaseCard::updateAmountInfo(int value)
{ {
availableAmount->setText(boost::lexical_cast<std::string>(maxAmount-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() void CreaturePurchaseCard::initSlider()

View File

@ -43,7 +43,7 @@ private:
void initCostBox(); void initCostBox();
std::shared_ptr<CButton> maxButton, minButton, creatureSwitcher; 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<CCreaturePic> picture;
std::shared_ptr<CreatureCostBox> cost; std::shared_ptr<CreatureCostBox> cost;
std::vector<CreatureID> upgradesID; std::vector<CreatureID> upgradesID;

View File

@ -35,7 +35,7 @@ void QuickRecruitmentWindow::setCancelButton()
void QuickRecruitmentWindow::setBuyButton() 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); cancelButton->assignedKeys.insert(SDLK_ESCAPE);
buyButton->setImageOrder(0, 1, 2, 3); buyButton->setImageOrder(0, 1, 2, 3);
} }
@ -46,7 +46,7 @@ void QuickRecruitmentWindow::setMaxButton()
maxButton->setImageOrder(0, 1, 2, 3); maxButton->setImageOrder(0, 1, 2, 3);
} }
void QuickRecruitmentWindow::setCreaturePurhaseCards() void QuickRecruitmentWindow::setCreaturePurchaseCards()
{ {
int availableAmount = getAvailableCreatures(); int availableAmount = getAvailableCreatures();
Point position = Point((pos.w - 100*availableAmount - 8*(availableAmount-1))/2,64); 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) for(auto selected : cards)
{ {
@ -154,6 +154,6 @@ QuickRecruitmentWindow::QuickRecruitmentWindow(const CGTownInstance * townd, Rec
initWindow(startupPosition); initWindow(startupPosition);
setButtons(); setButtons();
setCreaturePurhaseCards(); setCreaturePurchaseCards();
maxAllCards(cards); maxAllCards(cards);
} }

View File

@ -31,11 +31,11 @@ private:
void setBuyButton(); void setBuyButton();
void setMaxButton(); void setMaxButton();
void setCreaturePurhaseCards(); void setCreaturePurchaseCards();
void maxAllCards(std::vector<std::shared_ptr<CreaturePurchaseCard>> cards); void maxAllCards(std::vector<std::shared_ptr<CreaturePurchaseCard>> cards);
void maxAllSlidersAmount(std::vector<std::shared_ptr<CreaturePurchaseCard>> cards); void maxAllSlidersAmount(std::vector<std::shared_ptr<CreaturePurchaseCard>> cards);
void purhaseUnits(); void purchaseUnits();
const CGTownInstance * town; const CGTownInstance * town;
std::shared_ptr<CButton> maxButton, buyButton, cancelButton; std::shared_ptr<CButton> maxButton, buyButton, cancelButton;