Add window resizing and positioning on Mac

This commit is contained in:
Wojtek Figat
2022-01-18 19:10:13 +01:00
parent 2aa3624f81
commit f9eb709a18
5 changed files with 98 additions and 2 deletions

View File

@@ -81,6 +81,15 @@ Vector2 MacUtils::PosToCoca(const Vector2& pos)
return result;
}
Vector2 MacUtils::CocaToPos(const Vector2& pos)
{
// MacOS uses y-coordinate starting at the bottom of the screen
Vector2 result = pos;
result -= GetScreensOrigin();
result.Y *= -1;
return result;
}
Vector2 MacUtils::GetScreensOrigin()
{
Vector2 result = Vector2::Zero;