Explorar o código

name opens town itself

Laserlicht %!s(int64=2) %!d(string=hai) anos
pai
achega
78026f40eb
Modificáronse 2 ficheiros con 5 adicións e 0 borrados
  1. 4 0
      client/windows/CKingdomInterface.cpp
  2. 1 0
      client/windows/CKingdomInterface.h

+ 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;