2017-11-01 15:58:49 +02:00
|
|
|
/*
|
|
|
|
* 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
|
|
|
|
|
|
|
|
#include "../widgets/CGarrisonInt.h"
|
|
|
|
|
|
|
|
class CButton;
|
|
|
|
class CreatureCostBox;
|
2017-12-20 21:08:21 +02:00
|
|
|
class CreaturePurchaseCard;
|
2017-11-01 15:58:49 +02:00
|
|
|
class CFilledTexture;
|
|
|
|
|
|
|
|
class QuickRecruitmentWindow : public CWindowObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
int getAvailableCreatures();
|
|
|
|
void updateAllSliders();
|
2017-11-15 20:44:54 +02:00
|
|
|
QuickRecruitmentWindow(const CGTownInstance * townd, Rect startupPosition);
|
2017-11-01 15:58:49 +02:00
|
|
|
|
|
|
|
private:
|
2017-11-15 20:44:54 +02:00
|
|
|
void initWindow(Rect startupPosition);
|
2017-11-01 15:58:49 +02:00
|
|
|
|
|
|
|
void setButtons();
|
|
|
|
void setCancelButton();
|
|
|
|
void setBuyButton();
|
|
|
|
void setMaxButton();
|
|
|
|
|
2022-09-17 14:44:13 +02:00
|
|
|
void setCreaturePurchaseCards();
|
2017-11-01 15:58:49 +02:00
|
|
|
|
2017-12-20 21:08:21 +02:00
|
|
|
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();
|
2017-11-14 09:50:04 +02:00
|
|
|
|
2017-11-01 15:58:49 +02:00
|
|
|
const CGTownInstance * town;
|
|
|
|
std::shared_ptr<CButton> maxButton, buyButton, cancelButton;
|
|
|
|
std::shared_ptr<CreatureCostBox> totalCost;
|
2017-12-20 21:08:21 +02:00
|
|
|
std::vector<std::shared_ptr<CreaturePurchaseCard>> cards;
|
2017-11-01 15:58:49 +02:00
|
|
|
std::shared_ptr<CFilledTexture> backgroundTexture;
|
2017-12-26 12:03:19 +02:00
|
|
|
std::shared_ptr<CPicture> costBackground;
|
2017-11-01 15:58:49 +02:00
|
|
|
};
|