1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 03:25:11 +08:00

Locallise ChildItems to DrawableCarouselBeatmapSet for clarity

This commit is contained in:
Dean Herbert 2020-10-13 19:15:56 +09:00
parent 37daefc2b5
commit 5d11db7753
4 changed files with 3 additions and 7 deletions

View File

@ -923,7 +923,7 @@ namespace osu.Game.Tests.Visual.SongSelect
if (item is DrawableCarouselBeatmapSet set)
{
foreach (var difficulty in set.ChildItems)
foreach (var difficulty in set.DrawableBeatmaps)
yield return difficulty;
}
}

View File

@ -640,7 +640,7 @@ namespace osu.Game.Screens.Select
if (item is DrawableCarouselBeatmapSet set)
{
foreach (var diff in set.ChildItems)
foreach (var diff in set.DrawableBeatmaps)
updateItem(diff, item);
}
}

View File

@ -32,7 +32,7 @@ namespace osu.Game.Screens.Select.Carousel
[Resolved(CanBeNull = true)]
private ManageCollectionsDialog manageCollectionsDialog { get; set; }
public override IEnumerable<DrawableCarouselItem> ChildItems => beatmapContainer?.Children ?? base.ChildItems;
public IEnumerable<DrawableCarouselItem> DrawableBeatmaps => beatmapContainer?.Children ?? Enumerable.Empty<DrawableCarouselItem>();
private BeatmapSetInfo beatmapSet => (Item as CarouselBeatmapSet)?.BeatmapSet;

View File

@ -1,9 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@ -62,8 +60,6 @@ namespace osu.Game.Screens.Select.Carousel
}
}
public virtual IEnumerable<DrawableCarouselItem> ChildItems => Enumerable.Empty<DrawableCarouselItem>();
protected DrawableCarouselItem()
{
RelativeSizeAxes = Axes.X;