Merge branch 'master' into update-beatmap-settings

This commit is contained in:
Dan Balasescu
2019-12-18 17:59:27 +09:00
committed by GitHub
151 changed files with 1677 additions and 488 deletions

View File

@ -587,13 +587,16 @@ namespace osu.Game.Screens.Select
switch (d)
{
case DrawableCarouselBeatmapSet set:
{
lastSet = set;
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;
@ -619,6 +622,7 @@ namespace osu.Game.Screens.Select
}
break;
}
}
}

View File

@ -37,13 +37,13 @@ namespace osu.Game.Screens.Select.Carousel
{
default:
case SortMode.Artist:
return string.Compare(BeatmapSet.Metadata.Artist, otherSet.BeatmapSet.Metadata.Artist, StringComparison.InvariantCultureIgnoreCase);
return string.Compare(BeatmapSet.Metadata.Artist, otherSet.BeatmapSet.Metadata.Artist, StringComparison.OrdinalIgnoreCase);
case SortMode.Title:
return string.Compare(BeatmapSet.Metadata.Title, otherSet.BeatmapSet.Metadata.Title, StringComparison.InvariantCultureIgnoreCase);
return string.Compare(BeatmapSet.Metadata.Title, otherSet.BeatmapSet.Metadata.Title, StringComparison.OrdinalIgnoreCase);
case SortMode.Author:
return string.Compare(BeatmapSet.Metadata.Author.Username, otherSet.BeatmapSet.Metadata.Author.Username, StringComparison.InvariantCultureIgnoreCase);
return string.Compare(BeatmapSet.Metadata.Author.Username, otherSet.BeatmapSet.Metadata.Author.Username, StringComparison.OrdinalIgnoreCase);
case SortMode.DateAdded:
return otherSet.BeatmapSet.DateAdded.CompareTo(BeatmapSet.DateAdded);

View File

@ -27,8 +27,8 @@ namespace osu.Game.Screens.Select.Details
metrics = value;
var retries = Metrics?.Retries ?? new int[0];
var fails = Metrics?.Fails ?? new int[0];
var retries = Metrics?.Retries ?? Array.Empty<int>();
var fails = Metrics?.Fails ?? Array.Empty<int>();
float maxValue = fails.Any() ? fails.Zip(retries, (fail, retry) => fail + retry).Max() : 0;
failGraph.MaxValue = maxValue;

View File

@ -105,7 +105,7 @@ namespace osu.Game.Screens.Select
public string SearchTerm;
public bool Equals(OptionalTextFilter other) => SearchTerm?.Equals(other.SearchTerm) ?? true;
public bool Equals(OptionalTextFilter other) => SearchTerm == other.SearchTerm;
}
}
}