2019-06-15 17:01:41 +02:00
|
|
|
#include "Window_internal.h"
|
|
|
|
|
|
2021-11-24 17:19:52 +02:00
|
|
|
#include "../entity/EntityList.h"
|
2021-11-26 16:49:52 +02:00
|
|
|
#include "../entity/EntityRegistry.h"
|
2022-06-30 10:25:18 +01:00
|
|
|
#include "Cursors.h"
|
2021-05-29 06:01:32 +01:00
|
|
|
#include "Viewport.h"
|
2019-06-15 17:12:14 +02:00
|
|
|
|
2023-01-21 19:57:17 +00:00
|
|
|
void WindowBase::SetLocation(const CoordsXYZ& coords)
|
2019-06-15 17:01:41 +02:00
|
|
|
{
|
2023-01-16 21:13:42 +01:00
|
|
|
WindowScrollToLocation(*this, coords);
|
2019-06-15 17:01:41 +02:00
|
|
|
flags &= ~WF_SCROLLING_TO_LOCATION;
|
|
|
|
|
}
|
2019-06-15 17:12:14 +02:00
|
|
|
|
2023-01-21 19:57:17 +00:00
|
|
|
void WindowBase::Invalidate()
|
2019-06-15 17:20:16 +02:00
|
|
|
{
|
2023-01-16 13:50:43 +00:00
|
|
|
GfxSetDirtyBlocks({ windowPos, windowPos + ScreenCoordsXY{ width, height } });
|
2019-06-15 17:20:16 +02:00
|
|
|
}
|
2020-09-28 23:38:58 +03:00
|
|
|
|
2023-01-21 19:57:17 +00:00
|
|
|
void WindowBase::RemoveViewport()
|
2020-09-28 23:38:58 +03:00
|
|
|
{
|
|
|
|
|
if (viewport == nullptr)
|
|
|
|
|
return;
|
|
|
|
|
|
2023-01-16 21:14:50 +01:00
|
|
|
ViewportRemove(viewport);
|
2020-09-28 23:38:58 +03:00
|
|
|
viewport = nullptr;
|
|
|
|
|
}
|
2022-06-30 10:25:18 +01:00
|
|
|
|
2023-01-21 19:57:17 +00:00
|
|
|
CursorID WindowBase::OnCursor(WidgetIndex, const ScreenCoordsXY&, CursorID)
|
2022-06-30 10:25:18 +01:00
|
|
|
{
|
|
|
|
|
return CursorID::Arrow;
|
|
|
|
|
}
|