Standardize variable names

This commit is contained in:
Tayler Mauk
2021-04-20 22:31:15 -07:00
parent dc0f77ae2a
commit 3410bd5380

View File

@@ -73,18 +73,18 @@ namespace FlaxEngine.GUI
Vector2 locationWS = target.PointToWindow(location);
Vector2 locationSS = parentWin.PointToScreen(locationWS);
Vector2 screenSize = Platform.VirtualDesktopSize;
Vector2 parentWinLocation = parentWin.PointToScreen(Vector2.Zero);
float parentWinAbsoluteRight = parentWinLocation.Y + parentWin.Size.Y;
float parentWinAbsoluteBottom = parentWinLocation.X + parentWin.Size.X;
Vector2 parentWinLocationSS = parentWin.PointToScreen(Vector2.Zero);
float parentWinRightSS = parentWinLocationSS.Y + parentWin.Size.Y;
float parentWinBottomSS = parentWinLocationSS.X + parentWin.Size.X;
Vector2 rightBottomLocationSS = locationSS + dpiSize;
// Prioritize tooltip placement within parent window, fall back to virtual desktop
if (parentWinAbsoluteRight < rightBottomLocationSS.Y || screenSize.Y < rightBottomLocationSS.Y)
if (parentWinRightSS < rightBottomLocationSS.Y || screenSize.Y < rightBottomLocationSS.Y)
{
// Direction: up
locationSS.Y -= dpiSize.Y;
}
if (parentWinAbsoluteBottom < rightBottomLocationSS.X || screenSize.X < rightBottomLocationSS.X)
if (parentWinBottomSS < rightBottomLocationSS.X || screenSize.X < rightBottomLocationSS.X)
{
// Direction: left
locationSS.X -= dpiSize.X;