From fd8654cff3c9343a78cdda2749f5f5a26d293846 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 12 Oct 2020 20:26:20 +0900 Subject: [PATCH] Add back difficulty panel spacing --- osu.Game/Screens/Select/BeatmapCarousel.cs | 2 +- osu.Game/Screens/Select/Carousel/CarouselBeatmapSet.cs | 2 +- osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmap.cs | 4 +++- .../Screens/Select/Carousel/DrawableCarouselBeatmapSet.cs | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/osu.Game/Screens/Select/BeatmapCarousel.cs b/osu.Game/Screens/Select/BeatmapCarousel.cs index 9e295b6f53..04af07846f 100644 --- a/osu.Game/Screens/Select/BeatmapCarousel.cs +++ b/osu.Game/Screens/Select/BeatmapCarousel.cs @@ -732,7 +732,7 @@ namespace osu.Game.Screens.Select break; } - scrollTarget += b.TotalHeight; + scrollTarget += b.TotalHeight + DrawableCarouselBeatmap.CAROUSEL_BEATMAP_SPACING; } } diff --git a/osu.Game/Screens/Select/Carousel/CarouselBeatmapSet.cs b/osu.Game/Screens/Select/Carousel/CarouselBeatmapSet.cs index 7935debac7..f2f8cb9bd9 100644 --- a/osu.Game/Screens/Select/Carousel/CarouselBeatmapSet.cs +++ b/osu.Game/Screens/Select/Carousel/CarouselBeatmapSet.cs @@ -19,7 +19,7 @@ namespace osu.Game.Screens.Select.Carousel switch (State.Value) { case CarouselItemState.Selected: - return DrawableCarouselBeatmapSet.HEIGHT + Children.Count(c => c.Visible) * DrawableCarouselBeatmap.HEIGHT; + return DrawableCarouselBeatmapSet.HEIGHT + Children.Count(c => c.Visible) * (DrawableCarouselBeatmap.CAROUSEL_BEATMAP_SPACING + DrawableCarouselBeatmap.HEIGHT); default: return DrawableCarouselBeatmapSet.HEIGHT; diff --git a/osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmap.cs b/osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmap.cs index 656d1e39ba..23404a6c6e 100644 --- a/osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmap.cs +++ b/osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmap.cs @@ -31,7 +31,9 @@ namespace osu.Game.Screens.Select.Carousel { public class DrawableCarouselBeatmap : DrawableCarouselItem, IHasContextMenu { - public const float HEIGHT = MAX_HEIGHT * 0.6f; + public const float CAROUSEL_BEATMAP_SPACING = 5; + + public const float HEIGHT = MAX_HEIGHT * 0.6f; // TODO: add once base class is fixed + CAROUSEL_BEATMAP_SPACING; private readonly BeatmapInfo beatmap; diff --git a/osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmapSet.cs b/osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmapSet.cs index f03b6fff4a..20e6258433 100644 --- a/osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmapSet.cs +++ b/osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmapSet.cs @@ -190,12 +190,12 @@ namespace osu.Game.Screens.Select.Carousel if (carouselBeatmapSet != Item) return; - float yPos = 0; + float yPos = DrawableCarouselBeatmap.CAROUSEL_BEATMAP_SPACING; foreach (var item in loaded) { item.Y = yPos; - yPos += item.Item.TotalHeight; + yPos += item.Item.TotalHeight + DrawableCarouselBeatmap.CAROUSEL_BEATMAP_SPACING; } beatmapContainer.ChildrenEnumerable = loaded;