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

Method OnResize

src/waypoint_gui.cpp:177–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175 }
176
177 void OnResize() override
178 {
179 if (this->viewport != nullptr) {
180 NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WID_W_VIEWPORT);
181 nvp->UpdateViewportCoordinates(this);
182 this->wp->UpdateVirtCoord();
183
184 ScrollWindowToTile(this->GetCenterTile(), this, true); // Re-center viewport.
185 }
186 }
187
188 void OnQueryTextFinished(std::optional<std::string> str) override
189 {

Callers

nothing calls this directly

Calls 4

GetCenterTileMethod · 0.95
ScrollWindowToTileFunction · 0.85
UpdateVirtCoordMethod · 0.45

Tested by

no test coverage detected