| 1451 | friend class NWidgetSmallmapDisplay; |
| 1452 | |
| 1453 | SmallMapWindow(WindowDesc &desc, int window_number) : Window(desc) |
| 1454 | { |
| 1455 | _smallmap_industry_highlight = IT_INVALID; |
| 1456 | this->overlay = std::make_unique<LinkGraphOverlay>(this, WID_SM_MAP, 0, this->GetOverlayCompanyMask(), 1); |
| 1457 | this->CreateNestedTree(); |
| 1458 | this->LowerWidget(WID_SM_CONTOUR + this->map_type); |
| 1459 | |
| 1460 | this->RebuildColourIndexIfNecessary(); |
| 1461 | |
| 1462 | this->SetWidgetLoweredState(WID_SM_SHOW_HEIGHT, _smallmap_show_heightmap); |
| 1463 | |
| 1464 | this->SetWidgetLoweredState(WID_SM_TOGGLETOWNNAME, this->show_towns); |
| 1465 | this->SetWidgetLoweredState(WID_SM_SHOW_IND_NAMES, this->show_ind_names); |
| 1466 | |
| 1467 | this->SetupWidgetData(); |
| 1468 | this->FinishInitNested(window_number); |
| 1469 | |
| 1470 | this->SetZoomLevel(ZLC_INITIALIZE, nullptr); |
| 1471 | this->SmallMapCenterOnCurrentPos(); |
| 1472 | this->SetOverlayCargoMask(); |
| 1473 | } |
| 1474 | |
| 1475 | /** |
| 1476 | * Center the small map on the current center of the viewport. |
nothing calls this directly
no test coverage detected