MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / scrollToViewport

Method scrollToViewport

src/openrct2-ui/interface/Window.cpp:323–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321 }
322
323 void Window::scrollToViewport()
324 {
325 if (viewport == nullptr || !focus.has_value())
326 return;
327
328 CoordsXYZ newCoords = focus.value().GetPos();
329
330 auto mainWindow = WindowGetMain();
331 if (mainWindow != nullptr)
332 WindowScrollToLocation(*mainWindow, newCoords);
333 }
334
335 void Window::onDraw(RenderTarget& rt)
336 {

Callers

nothing calls this directly

Calls 4

WindowGetMainFunction · 0.85
WindowScrollToLocationFunction · 0.85
GetPosMethod · 0.80
valueMethod · 0.80

Tested by

no test coverage detected