1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 12:42:54 +08:00

Fix default progress graph flipping with a hack

This commit is contained in:
timiimit 2023-05-09 15:53:36 +02:00
parent efc4df95eb
commit 84efddcbc7

View File

@ -75,18 +75,28 @@ namespace osu.Game.Screens.Play
private Vector2 previousDrawSize;
private Vector2 previousParentScale;
protected override void Update()
{
base.Update();
if (graphNeedsUpdate || (values != null && DrawSize != previousDrawSize))
bool hasFlipped = previousParentScale != Parent.Scale;
if (graphNeedsUpdate || (values != null && DrawSize != previousDrawSize) || hasFlipped)
{
columns?.FadeOut(500, Easing.OutQuint).Expire();
scheduledCreate?.Cancel();
if (!hasFlipped)
{
scheduledCreate = Scheduler.AddDelayed(RecreateGraph, 500);
}
else
{
RecreateGraph();
}
previousDrawSize = DrawSize;
previousParentScale = Parent.Scale;
graphNeedsUpdate = false;
}
}