1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Merge pull request #3039 from Laserlicht/townhall_click

This commit is contained in:
Nordsoft91 2023-10-11 18:43:59 +02:00 committed by GitHub
commit ecd01fd53c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -1286,6 +1286,10 @@ void CCastleInterface::recreateIcons()
hall = std::make_shared<CTownInfo>(80, 413, town, true);
fort = std::make_shared<CTownInfo>(122, 413, town, false);
fastTownHall = std::make_shared<CButton>(Point(80, 413), AnimationPath::builtin("ITMTL.def"), CButton::tooltip(), [&](){ builds->enterTownHall(); });
fastTownHall->setImageOrder(town->hallLevel() - 1, town->hallLevel() - 1, town->hallLevel() - 1, town->hallLevel() - 1);
fastTownHall->setAnimateLonelyFrame(true);
fastArmyPurchase = std::make_shared<CButton>(Point(122, 413), AnimationPath::builtin("itmcl.def"), CButton::tooltip(), [&](){ builds->enterToTheQuickRecruitmentWindow(); });
fastArmyPurchase->setImageOrder(town->fortLevel() - 1, town->fortLevel() - 1, town->fortLevel() - 1, town->fortLevel() - 1);
fastArmyPurchase->setAnimateLonelyFrame(true);

View File

@ -154,7 +154,6 @@ class CCastleBuildings : public CIntObject
void enterCastleGate();
void enterFountain(const BuildingID & building, BuildingSubID::EBuildingSubID subID, BuildingID upgrades);//Rampart's fountains
void enterMagesGuild();
void enterTownHall();
void openMagesGuild();
void openTownHall();
@ -167,6 +166,7 @@ public:
~CCastleBuildings();
void enterDwelling(int level);
void enterTownHall();
void enterToTheQuickRecruitmentWindow();
void buildingClicked(BuildingID building, BuildingSubID::EBuildingSubID subID = BuildingSubID::NONE, BuildingID upgrades = BuildingID::NONE);
@ -226,6 +226,7 @@ class CCastleInterface : public CStatusbarWindow, public IGarrisonHolder
std::shared_ptr<CButton> exit;
std::shared_ptr<CButton> split;
std::shared_ptr<CButton> fastTownHall;
std::shared_ptr<CButton> fastArmyPurchase;
std::vector<std::shared_ptr<CCreaInfo>> creainfo;//small icons of creatures (bottom-left corner);