mirror of
https://github.com/ppy/osu.git
synced 2025-01-23 22:53:04 +08:00
Use already existing variable
This commit is contained in:
parent
fc3f9ff6fa
commit
6a0c5c87aa
@ -253,7 +253,7 @@ namespace osu.Game.Screens.Select
|
|||||||
/// <param name="skipDifficulties">Whether to skip individual difficulties and only increment over full groups.</param>
|
/// <param name="skipDifficulties">Whether to skip individual difficulties and only increment over full groups.</param>
|
||||||
public void SelectNext(int direction = 1, bool skipDifficulties = true)
|
public void SelectNext(int direction = 1, bool skipDifficulties = true)
|
||||||
{
|
{
|
||||||
if (!root.Children.Where(s => !s.Filtered.Value).ToList().Any())
|
if (!beatmapSets.Where(s => !s.Filtered.Value).ToList().Any())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (skipDifficulties)
|
if (skipDifficulties)
|
||||||
@ -264,7 +264,7 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
private void selectNextSet(int direction, bool skipDifficulties)
|
private void selectNextSet(int direction, bool skipDifficulties)
|
||||||
{
|
{
|
||||||
var visibleSets = root.Children.OfType<CarouselBeatmapSet>().Where(s => !s.Filtered.Value).ToList();
|
var visibleSets = beatmapSets.Where(s => !s.Filtered.Value).ToList();
|
||||||
|
|
||||||
var item = visibleSets[(visibleSets.IndexOf(selectedBeatmapSet) + direction + visibleSets.Count) % visibleSets.Count];
|
var item = visibleSets[(visibleSets.IndexOf(selectedBeatmapSet) + direction + visibleSets.Count) % visibleSets.Count];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user