1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 11:43:21 +08:00

Don't inflate set / group panels for simplicity

This commit is contained in:
Dean Herbert 2025-02-07 15:15:58 +09:00
parent 1cf375e329
commit d73f275143
No known key found for this signature in database
3 changed files with 5 additions and 22 deletions

View File

@ -28,8 +28,11 @@ namespace osu.Game.Screens.SelectV2
{
var inputRectangle = DrawRectangle;
// Cover the gaps introduced by the spacing between BeatmapPanels.
inputRectangle = inputRectangle.Inflate(new MarginPadding { Vertical = BeatmapCarousel.SPACING / 2f });
// Cover the gaps introduced by the spacing between BeatmapPanels so that clicks will not fall through the carousel.
//
// Caveat is that for simplicity, we are covering the full spacing, so panels with frontmost depth will have a slightly
// larger hit target.
inputRectangle = inputRectangle.Inflate(new MarginPadding { Vertical = BeatmapCarousel.SPACING });
return inputRectangle.Contains(ToLocalSpace(screenSpacePos));
}

View File

@ -26,16 +26,6 @@ namespace osu.Game.Screens.SelectV2
private OsuSpriteText text = null!;
private Box box = null!;
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos)
{
var inputRectangle = DrawRectangle;
// Cover a gap introduced by the spacing between a BeatmapSetPanel and a BeatmapPanel either below/above it.
inputRectangle = inputRectangle.Inflate(new MarginPadding { Vertical = BeatmapCarousel.SPACING / 2f });
return inputRectangle.Contains(ToLocalSpace(screenSpacePos));
}
[BackgroundDependencyLoader]
private void load()
{

View File

@ -27,16 +27,6 @@ namespace osu.Game.Screens.SelectV2
private Box box = null!;
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos)
{
var inputRectangle = DrawRectangle;
// Cover a gap introduced by the spacing between a GroupPanel and a BeatmapPanel either below/above it.
inputRectangle = inputRectangle.Inflate(new MarginPadding { Vertical = BeatmapCarousel.SPACING / 2f });
return inputRectangle.Contains(ToLocalSpace(screenSpacePos));
}
[BackgroundDependencyLoader]
private void load()
{