Merge branch 'feature-clip-cursor' of https://github.com/ScottLongley/FlaxEngine into ScottLongley-feature-clip-cursor

This commit is contained in:
Wojtek Figat
2022-07-16 09:03:47 +02:00
6 changed files with 73 additions and 0 deletions

View File

@@ -564,6 +564,34 @@ void WindowsWindow::EndTrackingMouse()
}
}
void WindowsWindow::StartClippingCursor(const Rectangle& bounds)
{
ASSERT(HasHWND());
if (!_isClippingCursor)
{
_isClippingCursor = true;
}
const RECT lpRect = {
bounds.GetUpperLeft().X,
bounds.GetUpperLeft().Y,
bounds.GetBottomRight().X,
bounds.GetBottomRight().Y
};
ClipCursor(&lpRect);
}
void WindowsWindow::EndClippingCursor()
{
if (_isClippingCursor)
{
_isClippingCursor = false;
ClipCursor(NULL);
}
}
void WindowsWindow::SetCursor(CursorType type)
{
// Base