1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00
vcmi/client/windows/QuickRecruitmentWindow.h

51 lines
1.3 KiB
C++
Raw Normal View History

/*
* QuickRecruitmentWindow.h, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
#pragma once
2023-07-07 00:08:29 +02:00
#include "../windows/CWindowObject.h"
VCMI_LIB_NAMESPACE_BEGIN
class CGTownInstance;
VCMI_LIB_NAMESPACE_END
class CButton;
class CreatureCostBox;
class CreaturePurchaseCard;
class CFilledTexture;
class QuickRecruitmentWindow : public CWindowObject
{
public:
int getAvailableCreatures();
void updateAllSliders();
QuickRecruitmentWindow(const CGTownInstance * townd, Rect startupPosition);
private:
void initWindow(Rect startupPosition);
void setButtons();
void setCancelButton();
void setBuyButton();
void setMaxButton();
2022-09-17 14:44:13 +02:00
void setCreaturePurchaseCards();
void maxAllCards(std::vector<std::shared_ptr<CreaturePurchaseCard>> cards);
void maxAllSlidersAmount(std::vector<std::shared_ptr<CreaturePurchaseCard>> cards);
2022-09-17 14:44:13 +02:00
void purchaseUnits();
const CGTownInstance * town;
std::shared_ptr<CButton> maxButton, buyButton, cancelButton;
std::shared_ptr<CreatureCostBox> totalCost;
std::vector<std::shared_ptr<CreaturePurchaseCard>> cards;
std::shared_ptr<CFilledTexture> backgroundTexture;
std::shared_ptr<CPicture> costBackground;
};