mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-18 20:43:04 +01:00
Rename Window_internal unit to WindowBase for consistency (#24163)
This commit is contained in:
40
src/openrct2/interface/WindowBase.cpp
Normal file
40
src/openrct2/interface/WindowBase.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
#include "WindowBase.h"
|
||||
|
||||
#include "../entity/EntityList.h"
|
||||
#include "../entity/EntityRegistry.h"
|
||||
#include "Cursors.h"
|
||||
#include "Viewport.h"
|
||||
|
||||
namespace OpenRCT2
|
||||
{
|
||||
void WindowBase::SetLocation(const CoordsXYZ& coords)
|
||||
{
|
||||
WindowScrollToLocation(*this, coords);
|
||||
flags &= ~WF_SCROLLING_TO_LOCATION;
|
||||
}
|
||||
|
||||
void WindowBase::Invalidate()
|
||||
{
|
||||
GfxSetDirtyBlocks({ windowPos, windowPos + ScreenCoordsXY{ width, height } });
|
||||
}
|
||||
|
||||
void WindowBase::RemoveViewport()
|
||||
{
|
||||
if (viewport == nullptr)
|
||||
return;
|
||||
|
||||
ViewportRemove(viewport);
|
||||
viewport = nullptr;
|
||||
}
|
||||
|
||||
void WindowBase::SetWidgets(const std::span<const Widget> newWidgets)
|
||||
{
|
||||
widgets.clear();
|
||||
widgets.insert(widgets.end(), newWidgets.begin(), newWidgets.end());
|
||||
}
|
||||
|
||||
CursorID WindowBase::OnCursor(WidgetIndex, const ScreenCoordsXY&, CursorID)
|
||||
{
|
||||
return CursorID::Arrow;
|
||||
}
|
||||
} // namespace OpenRCT2
|
||||
Reference in New Issue
Block a user