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

Method OnResize

src/industry_gui.cpp:1117–1125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1115 }
1116
1117 void OnResize() override
1118 {
1119 if (this->viewport != nullptr) {
1120 NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WID_IV_VIEWPORT);
1121 nvp->UpdateViewportCoordinates(this);
1122
1123 ScrollWindowToTile(Industry::Get(this->window_number)->location.GetCenterTile(), this, true); // Re-center viewport.
1124 }
1125 }
1126
1127 void OnMouseWheel(int wheel, WidgetID widget) override
1128 {

Callers

nothing calls this directly

Calls 3

ScrollWindowToTileFunction · 0.85
GetCenterTileMethod · 0.45

Tested by

no test coverage detected