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 authored and GitHub committed 2024-08-01 19:09:06 +00:00
1 parent b1e14c676d
commit 144fa13a84
7 files changed
+189 -185

No files matched your search

@@ -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 } });