Add back difficulty panel spacing

This commit is contained in:
Dean Herbert
2020-10-12 20:26:20 +09:00
parent ce67f65084
commit fd8654cff3
4 changed files with 7 additions and 5 deletions

View File

@ -732,7 +732,7 @@ namespace osu.Game.Screens.Select
break; break;
} }
scrollTarget += b.TotalHeight; scrollTarget += b.TotalHeight + DrawableCarouselBeatmap.CAROUSEL_BEATMAP_SPACING;
} }
} }

View File

@ -19,7 +19,7 @@ namespace osu.Game.Screens.Select.Carousel
switch (State.Value) switch (State.Value)
{ {
case CarouselItemState.Selected: 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: default:
return DrawableCarouselBeatmapSet.HEIGHT; return DrawableCarouselBeatmapSet.HEIGHT;

View File

@ -31,7 +31,9 @@ namespace osu.Game.Screens.Select.Carousel
{ {
public class DrawableCarouselBeatmap : DrawableCarouselItem, IHasContextMenu 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; private readonly BeatmapInfo beatmap;

View File

@ -190,12 +190,12 @@ namespace osu.Game.Screens.Select.Carousel
if (carouselBeatmapSet != Item) if (carouselBeatmapSet != Item)
return; return;
float yPos = 0; float yPos = DrawableCarouselBeatmap.CAROUSEL_BEATMAP_SPACING;
foreach (var item in loaded) foreach (var item in loaded)
{ {
item.Y = yPos; item.Y = yPos;
yPos += item.Item.TotalHeight; yPos += item.Item.TotalHeight + DrawableCarouselBeatmap.CAROUSEL_BEATMAP_SPACING;
} }
beatmapContainer.ChildrenEnumerable = loaded; beatmapContainer.ChildrenEnumerable = loaded;