1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Check if graph DrawSize changed

This commit is contained in:
HiddenNode 2022-09-17 10:45:04 +01:00
parent 0d76f4501d
commit e3d5ba5301

View File

@ -78,11 +78,13 @@ namespace osu.Game.Screens.Play
private readonly LayoutValue layout = new LayoutValue(Invalidation.DrawSize);
private ScheduledDelegate scheduledCreate;
private Vector2 previousDrawSize;
protected override void Update()
{
base.Update();
if (values != null && !layout.IsValid)
if (values != null && !layout.IsValid && DrawSize != previousDrawSize)
{
columns?.FadeOut(500, Easing.OutQuint).Expire();
@ -90,6 +92,7 @@ namespace osu.Game.Screens.Play
scheduledCreate = Scheduler.AddDelayed(RecreateGraph, 500);
layout.Validate();
previousDrawSize = DrawSize;
}
}