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
|
|
|
|
|
2023-07-07 00:08:29 +02:00
|
|
|
#include "../windows/CWindowObject.h"
|
2017-11-01 15:58:49 +02:00
|
|
|
|
2023-07-31 18:50:55 +02:00
|
|
|
VCMI_LIB_NAMESPACE_BEGIN
|
|
|
|
class CGTownInstance;
|
|
|
|
VCMI_LIB_NAMESPACE_END
|
|
|
|
|
2017-11-01 15:58:49 +02:00
|
|
|
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;
|
2024-01-10 00:38:54 +02:00
|
|
|
std::shared_ptr<CButton> maxButton;
|
|
|
|
std::shared_ptr<CButton> buyButton;
|
|
|
|
std::shared_ptr<CButton> cancelButton;
|
2017-11-01 15:58:49 +02:00
|
|
|
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
|
|
|
};
|