mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 05:52:55 +08:00
Fix default progress graph flipping with a hack
This commit is contained in:
parent
efc4df95eb
commit
84efddcbc7
@ -75,18 +75,28 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private Vector2 previousDrawSize;
|
private Vector2 previousDrawSize;
|
||||||
|
|
||||||
|
private Vector2 previousParentScale;
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
base.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();
|
scheduledCreate?.Cancel();
|
||||||
|
|
||||||
|
if (!hasFlipped)
|
||||||
|
{
|
||||||
scheduledCreate = Scheduler.AddDelayed(RecreateGraph, 500);
|
scheduledCreate = Scheduler.AddDelayed(RecreateGraph, 500);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RecreateGraph();
|
||||||
|
}
|
||||||
|
|
||||||
previousDrawSize = DrawSize;
|
previousDrawSize = DrawSize;
|
||||||
|
previousParentScale = Parent.Scale;
|
||||||
graphNeedsUpdate = false;
|
graphNeedsUpdate = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user