diff --git a/osu.Game.Tests/Visual/TestCaseBeatmapDetails.cs b/osu.Game.Tests/Visual/TestCaseBeatmapDetails.cs index bc4f89ac26..84af6453f5 100644 --- a/osu.Game.Tests/Visual/TestCaseBeatmapDetails.cs +++ b/osu.Game.Tests/Visual/TestCaseBeatmapDetails.cs @@ -21,7 +21,7 @@ public TestCaseBeatmapDetails() Padding = new MarginPadding(150), }); - AddStep("beatmap all metrics", () => details.Beatmap = new BeatmapInfo + AddStep("all metrics", () => details.Beatmap = new BeatmapInfo { Version = "All Metrics", Metadata = new BeatmapMetadata @@ -45,7 +45,30 @@ public TestCaseBeatmapDetails() }, }); - AddStep("beatmap ratings", () => details.Beatmap = new BeatmapInfo + AddStep("all except source", () => details.Beatmap = new BeatmapInfo + { + Version = "All Metrics", + Metadata = new BeatmapMetadata + { + Tags = "this beatmap has all the metrics", + }, + BaseDifficulty = new BeatmapDifficulty + { + CircleSize = 7, + DrainRate = 1, + OverallDifficulty = 5.7f, + ApproachRate = 3.5f, + }, + StarDifficulty = 5.3f, + Metrics = new BeatmapMetrics + { + Ratings = Enumerable.Range(0, 11), + Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6), + Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6), + }, + }); + + AddStep("ratings", () => details.Beatmap = new BeatmapInfo { Version = "Only Ratings", Metadata = new BeatmapMetadata @@ -67,7 +90,7 @@ public TestCaseBeatmapDetails() }, }); - AddStep("beatmap fails retries", () => details.Beatmap = new BeatmapInfo + AddStep("fails retries", () => details.Beatmap = new BeatmapInfo { Version = "Only Retries and Fails", Metadata = new BeatmapMetadata @@ -90,7 +113,7 @@ public TestCaseBeatmapDetails() }, }); - AddStep("beatmap no metrics", () => details.Beatmap = new BeatmapInfo + AddStep("no metrics", () => details.Beatmap = new BeatmapInfo { Version = "No Metrics", Metadata = new BeatmapMetadata diff --git a/osu.Game/Screens/Select/BeatmapDetails.cs b/osu.Game/Screens/Select/BeatmapDetails.cs index c0a004ede3..9f9263927e 100644 --- a/osu.Game/Screens/Select/BeatmapDetails.cs +++ b/osu.Game/Screens/Select/BeatmapDetails.cs @@ -116,6 +116,7 @@ public BeatmapDetails() RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, LayoutDuration = transition_duration, + LayoutEasing = Easing.OutQuad, Spacing = new Vector2(spacing * 2), Margin = new MarginPadding { Top = spacing * 2 }, Children = new[] @@ -336,10 +337,12 @@ public string Text { if (string.IsNullOrEmpty(value)) { - textContainer.FadeOut(transition_duration); + this.FadeOut(transition_duration); return; } + this.FadeIn(transition_duration); + setTextAsync(value); } }