| 352 | static const int WID_TV_HEIGHT_NORMAL = 150; |
| 353 | |
| 354 | TownViewWindow(WindowDesc &desc, WindowNumber window_number) : Window(desc) |
| 355 | { |
| 356 | this->CreateNestedTree(); |
| 357 | |
| 358 | this->town = Town::Get(window_number); |
| 359 | |
| 360 | this->FinishInitNested(window_number); |
| 361 | |
| 362 | this->flags.Set(WindowFlag::DisableVpScroll); |
| 363 | NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WID_TV_VIEWPORT); |
| 364 | nvp->InitializeViewport(this, this->town->xy, ScaleZoomGUI(ZoomLevel::Town)); |
| 365 | |
| 366 | /* disable renaming town in network games if you are not the server */ |
| 367 | this->SetWidgetDisabledState(WID_TV_CHANGE_NAME, _networking && !_network_server); |
| 368 | } |
| 369 | |
| 370 | void Close([[maybe_unused]] int data = 0) override |
| 371 | { |
nothing calls this directly
no test coverage detected