MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / OnResize

Method OnResize

src/town_gui.cpp:570–578  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

568 }
569
570 void OnResize() override
571 {
572 if (this->viewport != nullptr) {
573 NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WID_TV_VIEWPORT);
574 nvp->UpdateViewportCoordinates(this);
575
576 ScrollWindowToTile(this->town->xy, this, true); // Re-center viewport.
577 }
578 }
579
580 void OnMouseWheel(int wheel, WidgetID widget) override
581 {

Callers

nothing calls this directly

Calls 2

ScrollWindowToTileFunction · 0.85

Tested by

no test coverage detected