Fix context menu positioning for child menus when flipping the direction over Y axis

This commit is contained in:
Wojtek Figat
2020-12-21 11:49:02 +01:00
parent c987acb709
commit ed5450d7e6

View File

@@ -136,6 +136,10 @@ namespace FlaxEditor.GUI.ContextMenu
// Direction: up
isUp = true;
locationSS.Y -= dpiSize.Y;
// Offset to fix sub-menu location
if (parent is ContextMenu menu && menu._childCM != null)
locationSS.Y += 30.0f * dpiScale;
}
if (monitorBounds.Right < rightBottomLocationSS.X)
{