From aab4a79ce4e87ebc24481398b378cc939b64cd7c Mon Sep 17 00:00:00 2001 From: Salman Alshamrani Date: Wed, 5 Feb 2025 22:37:03 -0500 Subject: [PATCH] Push all beatmap panels to hide their tails --- osu.Game/Screens/SelectV2/BeatmapPanel.cs | 3 ++- osu.Game/Screens/SelectV2/BeatmapSetPanel.cs | 1 + .../Screens/SelectV2/BeatmapStandalonePanel.cs | 1 + osu.Game/Screens/SelectV2/GroupPanel.cs | 16 ++++++++++------ osu.Game/Screens/SelectV2/SongSelectV2.cs | 4 +--- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/osu.Game/Screens/SelectV2/BeatmapPanel.cs b/osu.Game/Screens/SelectV2/BeatmapPanel.cs index 896b8ea82a..e5b612b1b2 100644 --- a/osu.Game/Screens/SelectV2/BeatmapPanel.cs +++ b/osu.Game/Screens/SelectV2/BeatmapPanel.cs @@ -38,7 +38,7 @@ namespace osu.Game.Screens.SelectV2 // todo: this should be replaced with information from CarouselItem about how deep is BeatmapPanel in the carousel // (i.e. whether it's under a beatmap set that's under a group, or just under a top-level beatmap set). - private const float difficulty_x_offset = 80f; // constant X offset for beatmap difficulty panels specifically. + private const float difficulty_x_offset = 100f; // constant X offset for beatmap difficulty panels specifically. private const float preselected_x_offset = 25f; private const float selected_x_offset = 50f; @@ -99,6 +99,7 @@ namespace osu.Game.Screens.SelectV2 Masking = true, CornerRadius = corner_radius, RelativeSizeAxes = Axes.Both, + X = corner_radius, EdgeEffect = new EdgeEffectParameters { Type = EdgeEffectType.Shadow, diff --git a/osu.Game/Screens/SelectV2/BeatmapSetPanel.cs b/osu.Game/Screens/SelectV2/BeatmapSetPanel.cs index dff563339c..aabc39f27f 100644 --- a/osu.Game/Screens/SelectV2/BeatmapSetPanel.cs +++ b/osu.Game/Screens/SelectV2/BeatmapSetPanel.cs @@ -81,6 +81,7 @@ namespace osu.Game.Screens.SelectV2 Masking = true, CornerRadius = corner_radius, RelativeSizeAxes = Axes.Both, + X = corner_radius, EdgeEffect = new EdgeEffectParameters { Type = EdgeEffectType.Shadow, diff --git a/osu.Game/Screens/SelectV2/BeatmapStandalonePanel.cs b/osu.Game/Screens/SelectV2/BeatmapStandalonePanel.cs index c3a773799a..c0a5f828f4 100644 --- a/osu.Game/Screens/SelectV2/BeatmapStandalonePanel.cs +++ b/osu.Game/Screens/SelectV2/BeatmapStandalonePanel.cs @@ -105,6 +105,7 @@ namespace osu.Game.Screens.SelectV2 Masking = true, CornerRadius = corner_radius, RelativeSizeAxes = Axes.Both, + X = corner_radius, EdgeEffect = new EdgeEffectParameters { Type = EdgeEffectType.Shadow, diff --git a/osu.Game/Screens/SelectV2/GroupPanel.cs b/osu.Game/Screens/SelectV2/GroupPanel.cs index 10d3b8934e..b5fa338f82 100644 --- a/osu.Game/Screens/SelectV2/GroupPanel.cs +++ b/osu.Game/Screens/SelectV2/GroupPanel.cs @@ -24,6 +24,8 @@ namespace osu.Game.Screens.SelectV2 { public const float HEIGHT = CarouselItem.DEFAULT_HEIGHT; + private const float corner_radius = 10; + private const float glow_offset = 10f; // extra space for any edge effect to not be cutoff by the right edge of the carousel. private const float preselected_x_offset = 25f; private const float selected_x_offset = 50f; @@ -33,18 +35,19 @@ namespace osu.Game.Screens.SelectV2 [Resolved] private BeatmapCarousel? carousel { get; set; } + private Container panel = null!; private Box activationFlash = null!; private OsuSpriteText titleText = null!; private Box hoverLayer = null!; public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) { - var inputRectangle = DrawRectangle; + var inputRectangle = panel.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)); + return inputRectangle.Contains(panel.ToLocalSpace(screenSpacePos)); } [BackgroundDependencyLoader] @@ -55,11 +58,12 @@ namespace osu.Game.Screens.SelectV2 RelativeSizeAxes = Axes.X; Height = HEIGHT; - InternalChild = new Container + InternalChild = panel = new Container { RelativeSizeAxes = Axes.Both, - CornerRadius = 10f, + CornerRadius = corner_radius, Masking = true, + X = corner_radius, Children = new Drawable[] { new Container @@ -69,7 +73,7 @@ namespace osu.Game.Screens.SelectV2 Child = new Container { RelativeSizeAxes = Axes.Both, - CornerRadius = 10f, + CornerRadius = corner_radius, Masking = true, Children = new Drawable[] { @@ -93,7 +97,7 @@ namespace osu.Game.Screens.SelectV2 Child = new Container { RelativeSizeAxes = Axes.Both, - CornerRadius = 10f, + CornerRadius = corner_radius, Masking = true, Children = new Drawable[] { diff --git a/osu.Game/Screens/SelectV2/SongSelectV2.cs b/osu.Game/Screens/SelectV2/SongSelectV2.cs index 88825d96e0..3943d059f9 100644 --- a/osu.Game/Screens/SelectV2/SongSelectV2.cs +++ b/osu.Game/Screens/SelectV2/SongSelectV2.cs @@ -48,9 +48,7 @@ namespace osu.Game.Screens.SelectV2 Anchor = Anchor.TopRight, Origin = Anchor.TopRight, RelativeSizeAxes = Axes.Both, - Width = 0.5f, - // Push the carousel slightly off the right edge of the screen for the ends of the panels to be cut off. - X = 20f, + Width = 0.6f, }, }, modSelectOverlay,