|
|
@@ -1436,7 +1436,10 @@ CCastleInterface::CCastleInterface(const CGTownInstance * Town, const CGTownInst
|
|
|
garr->setRedrawParent(true);
|
|
|
|
|
|
heroes = std::make_shared<HeroSlots>(town, Point(241, 387), Point(241, 483), garr, true);
|
|
|
- title = std::make_shared<CTextInputWithConfirm>(Rect(83, 386, 140, 20), FONT_MEDIUM, ETextAlignment::TOPLEFT, town->getNameTranslated(), true, [this](){ std::cout << title->getText(); });
|
|
|
+ title = std::make_shared<CTextInputWithConfirm>(Rect(83, 386, 140, 20), FONT_MEDIUM, ETextAlignment::TOPLEFT, town->getNameTranslated(), true, [this](){
|
|
|
+ std::string name = title->getText();
|
|
|
+ GAME->interface()->cb->setTownName(town, name);
|
|
|
+ });
|
|
|
income = std::make_shared<CLabel>(195, 443, FONT_SMALL, ETextAlignment::CENTER);
|
|
|
icon = std::make_shared<CAnimImage>(AnimationPath::builtin("ITPT"), 0, 0, 15, 387);
|
|
|
|