1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 09:14:58 +01:00

Move more Ui functions to Ui library (#22444)

* Move various methods into the ui library

* Move various zoom functions to ui
This commit is contained in:
Duncan
2024-08-01 20:09:06 +01:00
committed by GitHub
parent b1e14c676d
commit 144fa13a84
7 changed files with 189 additions and 185 deletions

View File

@@ -11,18 +11,6 @@ void WindowBase::SetLocation(const CoordsXYZ& coords)
flags &= ~WF_SCROLLING_TO_LOCATION;
}
void WindowBase::ScrollToViewport()
{
if (viewport == nullptr || !focus.has_value())
return;
CoordsXYZ newCoords = focus.value().GetPos();
auto mainWindow = WindowGetMain();
if (mainWindow != nullptr)
WindowScrollToLocation(*mainWindow, newCoords);
}
void WindowBase::Invalidate()
{
GfxSetDirtyBlocks({ windowPos, windowPos + ScreenCoordsXY{ width, height } });