瀏覽代碼

name opens town itself

Laserlicht 2 年之前
父節點
當前提交
78026f40eb
共有 2 個文件被更改,包括 5 次插入0 次删除
  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"));
 		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()
 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<CButton> fastArmyPurchase;
 	std::shared_ptr<LRClickableArea> fastMarket;
 	std::shared_ptr<LRClickableArea> fastMarket;
 	std::shared_ptr<LRClickableArea> fastTavern;
 	std::shared_ptr<LRClickableArea> fastTavern;
+	std::shared_ptr<LRClickableArea> fastTown;
 
 
 public:
 public:
 	const CGTownInstance * town;
 	const CGTownInstance * town;