mirror of
https://github.com/ppy/osu
synced 2025-01-01 11:52:20 +00:00
More robust implementation
This commit is contained in:
parent
84efddcbc7
commit
ad80e2ff51
@ -81,20 +81,31 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
base.Update();
|
||||
|
||||
bool hasFlipped = previousParentScale != Parent.Scale;
|
||||
if (graphNeedsUpdate || (values != null && DrawSize != previousDrawSize) || hasFlipped)
|
||||
bool extraUpdateConditions =
|
||||
DrawSize != previousDrawSize ||
|
||||
previousParentScale != Parent.Scale;
|
||||
|
||||
if (graphNeedsUpdate || (values != null && extraUpdateConditions))
|
||||
{
|
||||
scheduledCreate?.Cancel();
|
||||
bool hasFlipped =
|
||||
previousParentScale.X == -Parent.Scale.X ||
|
||||
previousParentScale.Y == -Parent.Scale.Y;
|
||||
|
||||
if (!hasFlipped)
|
||||
{
|
||||
scheduledCreate = Scheduler.AddDelayed(RecreateGraph, 500);
|
||||
columns?.FadeOut(500, Easing.OutQuint).Expire();
|
||||
}
|
||||
else
|
||||
{
|
||||
RecreateGraph();
|
||||
if (columns != null)
|
||||
{
|
||||
columns.Alpha = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
scheduledCreate?.Cancel();
|
||||
scheduledCreate = Scheduler.AddDelayed(RecreateGraph, 500);
|
||||
|
||||
previousDrawSize = DrawSize;
|
||||
previousParentScale = Parent.Scale;
|
||||
graphNeedsUpdate = false;
|
||||
|
Loading…
Reference in New Issue
Block a user