mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 01:47:30 +09:00
Merge pull request #12921 from peppy/fix-hud-offsets-out-of-bounds
Limit automatically calculated HUD offsets to keep menu items on screen
This commit is contained in:
commit
28f91f8d65
@ -196,12 +196,12 @@ namespace osu.Game.Screens.Play
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (lowestTopScreenSpace.HasValue)
|
if (lowestTopScreenSpace.HasValue)
|
||||||
topRightElements.Y = TopScoringElementsHeight = ToLocalSpace(lowestTopScreenSpace.Value).Y;
|
topRightElements.Y = TopScoringElementsHeight = MathHelper.Clamp(ToLocalSpace(lowestTopScreenSpace.Value).Y, 0, DrawHeight - topRightElements.DrawHeight);
|
||||||
else
|
else
|
||||||
topRightElements.Y = 0;
|
topRightElements.Y = 0;
|
||||||
|
|
||||||
if (highestBottomScreenSpace.HasValue)
|
if (highestBottomScreenSpace.HasValue)
|
||||||
bottomRightElements.Y = BottomScoringElementsHeight = -(DrawHeight - ToLocalSpace(highestBottomScreenSpace.Value).Y);
|
bottomRightElements.Y = BottomScoringElementsHeight = -MathHelper.Clamp(DrawHeight - ToLocalSpace(highestBottomScreenSpace.Value).Y, 0, DrawHeight - bottomRightElements.DrawHeight);
|
||||||
else
|
else
|
||||||
bottomRightElements.Y = 0;
|
bottomRightElements.Y = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user