mirror of https://github.com/ppy/osu
Fix HUD elements shifting in unintended manner when partially off-screen flipped skin elements are present
Closes https://github.com/ppy/osu/issues/30286.
This commit is contained in:
parent
54288c350a
commit
b0c6042b2a
|
@ -300,7 +300,9 @@ void processDrawable(ISerialisableDrawable element)
|
|||
if (element is LegacyHealthDisplay)
|
||||
return;
|
||||
|
||||
float bottom = drawable.ScreenSpaceDrawQuad.BottomRight.Y;
|
||||
// AABB is used here because the drawable can be flipped/rotated arbitrarily,
|
||||
// so the "bottom right" corner of the raw SSDQ might not necessarily be where one expects it to be.
|
||||
float bottom = drawable.ScreenSpaceDrawQuad.AABBFloat.BottomRight.Y;
|
||||
|
||||
bool isRelativeX = drawable.RelativeSizeAxes == Axes.X;
|
||||
|
||||
|
@ -319,7 +321,7 @@ void processDrawable(ISerialisableDrawable element)
|
|||
// and align bottom-right components with the top-edge of the highest bottom-anchored hud element.
|
||||
else if (drawable.Anchor.HasFlag(Anchor.BottomRight) || (drawable.Anchor.HasFlag(Anchor.y2) && drawable.RelativeSizeAxes == Axes.X))
|
||||
{
|
||||
var topLeft = element.ScreenSpaceDrawQuad.TopLeft;
|
||||
var topLeft = element.ScreenSpaceDrawQuad.AABBFloat.TopLeft;
|
||||
if (highestBottomScreenSpace == null || topLeft.Y < highestBottomScreenSpace.Value.Y)
|
||||
highestBottomScreenSpace = topLeft;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue