mirror of
https://github.com/ppy/osu.git
synced 2025-03-11 10:17:18 +08:00
Add invalidation on draw size change in beatmap carousel v2
Matching old implementation.
This commit is contained in:
parent
f4bb3bc422
commit
cb42ef95c5
@ -16,6 +16,7 @@ using osu.Framework.Graphics.Cursor;
|
|||||||
using osu.Framework.Graphics.Pooling;
|
using osu.Framework.Graphics.Pooling;
|
||||||
using osu.Framework.Input.Bindings;
|
using osu.Framework.Input.Bindings;
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
|
using osu.Framework.Layout;
|
||||||
using osu.Framework.Logging;
|
using osu.Framework.Logging;
|
||||||
using osu.Framework.Utils;
|
using osu.Framework.Utils;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
@ -678,6 +679,15 @@ namespace osu.Game.Screens.SelectV2
|
|||||||
carouselPanel.Expanded.Value = false;
|
carouselPanel.Expanded.Value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override bool OnInvalidate(Invalidation invalidation, InvalidationSource source)
|
||||||
|
{
|
||||||
|
// handles the vertical size of the carousel changing (ie. on window resize when aspect ratio has changed).
|
||||||
|
if (invalidation.HasFlag(Invalidation.DrawSize))
|
||||||
|
selectionValid.Invalidate();
|
||||||
|
|
||||||
|
return base.OnInvalidate(invalidation, source);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Internal helper classes
|
#region Internal helper classes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user