Ver código fonte

name opens town itself

Laserlicht 2 anos atrás
pai
commit
78026f40eb

+ 4 - 0
client/windows/CKingdomInterface.cpp

@@ -822,6 +822,10 @@ CTownItem::CTownItem(const CGTownInstance * Town)
 		}
 		LOCPLINT->showInfoDialog(CGI->generaltexth->translate("vcmi.adventureMap.noTownWithMarket"));
 	});
+	fastTown = std::make_shared<LRClickableArea>(Rect(67, 6, 165, 20), [&]()
+	{
+		GH.windows().createAndPushWindow<CCastleInterface>(town);
+	});
 }
 
 void CTownItem::updateGarrisons()

+ 1 - 0
client/windows/CKingdomInterface.h

@@ -282,6 +282,7 @@ class CTownItem : public CIntObject, public IGarrisonHolder
 	std::shared_ptr<CButton> fastArmyPurchase;
 	std::shared_ptr<LRClickableArea> fastMarket;
 	std::shared_ptr<LRClickableArea> fastTavern;
+	std::shared_ptr<LRClickableArea> fastTown;
 
 public:
 	const CGTownInstance * town;