mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Remove unnecessary carousel variable, fix code formatting
This commit is contained in:
@ -123,7 +123,7 @@ namespace osu.Game.Screens.Select.Carousel
|
|||||||
|
|
||||||
return beatmaps.Count > maximum_difficulty_icons
|
return beatmaps.Count > maximum_difficulty_icons
|
||||||
? (IEnumerable<DifficultyIcon>)beatmaps.GroupBy(b => b.Beatmap.Ruleset).Select(group => new FilterableGroupedDifficultyIcon(group.ToList(), group.Key))
|
? (IEnumerable<DifficultyIcon>)beatmaps.GroupBy(b => b.Beatmap.Ruleset).Select(group => new FilterableGroupedDifficultyIcon(group.ToList(), group.Key))
|
||||||
: beatmaps.Select(b => new FilterableDifficultyIcon(b, songSelect, songSelect.Carousel));
|
: beatmaps.Select(b => new FilterableDifficultyIcon(b, songSelect));
|
||||||
}
|
}
|
||||||
|
|
||||||
public MenuItem[] ContextMenuItems
|
public MenuItem[] ContextMenuItems
|
||||||
@ -216,11 +216,10 @@ namespace osu.Game.Screens.Select.Carousel
|
|||||||
{
|
{
|
||||||
private readonly BindableBool filtered = new BindableBool();
|
private readonly BindableBool filtered = new BindableBool();
|
||||||
|
|
||||||
private SongSelect songSelect;
|
private readonly SongSelect songSelect;
|
||||||
private BeatmapCarousel carousel;
|
private readonly BeatmapInfo info;
|
||||||
private BeatmapInfo info;
|
|
||||||
|
|
||||||
public FilterableDifficultyIcon(CarouselBeatmap item, SongSelect songSelect, BeatmapCarousel carousel)
|
public FilterableDifficultyIcon(CarouselBeatmap item, SongSelect songSelect)
|
||||||
: base(item.Beatmap)
|
: base(item.Beatmap)
|
||||||
{
|
{
|
||||||
filtered.BindTo(item.Filtered);
|
filtered.BindTo(item.Filtered);
|
||||||
@ -228,7 +227,6 @@ namespace osu.Game.Screens.Select.Carousel
|
|||||||
filtered.TriggerChange();
|
filtered.TriggerChange();
|
||||||
|
|
||||||
this.songSelect = songSelect;
|
this.songSelect = songSelect;
|
||||||
this.carousel = carousel;
|
|
||||||
info = item.Beatmap;
|
info = item.Beatmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,7 +234,7 @@ namespace osu.Game.Screens.Select.Carousel
|
|||||||
{
|
{
|
||||||
if (!filtered.Value)
|
if (!filtered.Value)
|
||||||
{
|
{
|
||||||
carousel?.SelectBeatmap(info);
|
songSelect?.Carousel.SelectBeatmap(info);
|
||||||
|
|
||||||
if (e.AltPressed)
|
if (e.AltPressed)
|
||||||
songSelect?.FinaliseSelection();
|
songSelect?.FinaliseSelection();
|
||||||
|
Reference in New Issue
Block a user