1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 06:47:24 +08:00

Fix autoplay/replay settings going off screen on some legacy skins

This commit is contained in:
Joehu 2020-10-19 12:04:23 -07:00
parent b9c1d21743
commit dbda18acea

View File

@ -208,17 +208,9 @@ namespace osu.Game.Screens.Play
{
base.Update();
float topRightOffset = 0;
// for now align with the accuracy counter. eventually this will be user customisable.
topRightElements.Y = ToLocalSpace(AccuracyCounter.Drawable.ScreenSpaceDrawQuad.BottomRight).Y;
// fetch the bottom-most position of any main ui element that is anchored to the top of the screen.
// consider this kind of temporary.
foreach (var d in mainUIElements)
{
if (d is SkinnableDrawable sd && (sd.Drawable.Anchor & Anchor.y0) > 0)
topRightOffset = Math.Max(sd.Drawable.ScreenSpaceDrawQuad.BottomRight.Y, topRightOffset);
}
topRightElements.Y = ToLocalSpace(new Vector2(0, topRightOffset)).Y;
bottomRightElements.Y = -Progress.Height;
}