1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-11 07:17:18 +08:00

Add invalidation on draw size change in beatmap carousel v2

Matching old implementation.
This commit is contained in:
Dean Herbert 2025-02-06 17:48:42 +09:00
parent f4bb3bc422
commit cb42ef95c5
No known key found for this signature in database

View File

@ -16,6 +16,7 @@ using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Pooling;
using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events;
using osu.Framework.Layout;
using osu.Framework.Logging;
using osu.Framework.Utils;
using osu.Game.Graphics.Containers;
@ -678,6 +679,15 @@ namespace osu.Game.Screens.SelectV2
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
#region Internal helper classes