Merge remote-tracking branch 'upstream/master' into refactor-select-footer

This commit is contained in:
Dean Herbert
2019-05-08 18:43:21 +09:00
233 changed files with 970 additions and 70 deletions

View File

@ -257,6 +257,7 @@ namespace osu.Game.Screens.Select
select(beatmap);
return;
case CarouselBeatmapSet set:
if (skipDifficulties)
select(set);
@ -292,6 +293,7 @@ namespace osu.Game.Screens.Select
if (RandomAlgorithm.Value == RandomSelectAlgorithm.RandomPermutation)
{
var notYetVisitedSets = visibleSets.Except(previouslyVisitedRandomSets).ToList();
if (!notYetVisitedSets.Any())
{
previouslyVisitedRandomSets.RemoveAll(s => visibleSets.Contains(s));
@ -394,13 +396,16 @@ namespace osu.Game.Screens.Select
case Key.Up:
direction = -1;
break;
case Key.Down:
direction = 1;
break;
case Key.Left:
direction = -1;
skipDifficulties = true;
break;
case Key.Right:
direction = 1;
skipDifficulties = true;
@ -465,8 +470,10 @@ namespace osu.Game.Screens.Select
case LoadState.NotLoaded:
LoadComponentAsync(item);
break;
case LoadState.Loading:
break;
default:
scrollableContent.Add(item);
break;
@ -557,6 +564,7 @@ namespace osu.Game.Screens.Select
set.MoveToX(set.Item.State.Value == CarouselItemState.Selected ? -100 : 0, 500, Easing.OutExpo);
set.MoveToY(currentY, 750, Easing.OutExpo);
break;
case DrawableCarouselBeatmap beatmap:
if (beatmap.Item.State.Value == CarouselItemState.Selected)
scrollTarget = currentY + beatmap.DrawHeight / 2 - DrawHeight / 2;

View File

@ -38,10 +38,13 @@ namespace osu.Game.Screens.Select.Carousel
default:
case SortMode.Artist:
return string.Compare(BeatmapSet.Metadata.Artist, otherSet.BeatmapSet.Metadata.Artist, StringComparison.InvariantCultureIgnoreCase);
case SortMode.Title:
return string.Compare(BeatmapSet.Metadata.Title, otherSet.BeatmapSet.Metadata.Title, StringComparison.InvariantCultureIgnoreCase);
case SortMode.Author:
return string.Compare(BeatmapSet.Metadata.Author.Username, otherSet.BeatmapSet.Metadata.Author.Username, StringComparison.InvariantCultureIgnoreCase);
case SortMode.Difficulty:
return BeatmapSet.MaxStarDifficulty.CompareTo(otherSet.BeatmapSet.MaxStarDifficulty);
}

View File

@ -66,6 +66,7 @@ namespace osu.Game.Screens.Select.Carousel
case CarouselItemState.NotSelected:
InternalChildren.ForEach(c => c.State.Value = CarouselItemState.Collapsed);
break;
case CarouselItemState.Selected:
InternalChildren.ForEach(c =>
{

View File

@ -69,6 +69,7 @@ namespace osu.Game.Screens.Select.Carousel
case CarouselItemState.Selected:
updateSelected(item);
break;
case CarouselItemState.NotSelected:
case CarouselItemState.Collapsed:
attemptSelection();

View File

@ -107,6 +107,7 @@ namespace osu.Game.Screens.Select.Carousel
case CarouselItemState.NotSelected:
Deselected();
break;
case CarouselItemState.Selected:
Selected();
break;

View File

@ -53,6 +53,7 @@ namespace osu.Game.Screens.Select
var autoType = auto.GetType();
var mods = Mods.Value;
if (mods.All(m => m.GetType() != autoType))
{
Mods.Value = mods.Append(auto).ToArray();