mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 14:17:26 +08:00
Merge pull request #10224 from peppy/results-statistics-replay-button
Add more descriptive description and download button when statistics not available
This commit is contained in:
commit
02d8355321
@ -220,7 +220,7 @@ namespace osu.Game.Tests.Visual.Ranking
|
||||
|
||||
AddStep("load results", () => Child = new TestResultsContainer(screen = createResultsScreen()));
|
||||
|
||||
AddAssert("download button is disabled", () => !screen.ChildrenOfType<DownloadButton>().Single().Enabled.Value);
|
||||
AddAssert("download button is disabled", () => !screen.ChildrenOfType<DownloadButton>().Last().Enabled.Value);
|
||||
|
||||
AddStep("click contracted panel", () =>
|
||||
{
|
||||
@ -229,7 +229,7 @@ namespace osu.Game.Tests.Visual.Ranking
|
||||
InputManager.Click(MouseButton.Left);
|
||||
});
|
||||
|
||||
AddAssert("download button is enabled", () => screen.ChildrenOfType<DownloadButton>().Single().Enabled.Value);
|
||||
AddAssert("download button is enabled", () => screen.ChildrenOfType<DownloadButton>().Last().Enabled.Value);
|
||||
}
|
||||
|
||||
private class TestResultsContainer : Container
|
||||
|
@ -75,7 +75,23 @@ namespace osu.Game.Screens.Ranking.Statistics
|
||||
return;
|
||||
|
||||
if (newScore.HitEvents == null || newScore.HitEvents.Count == 0)
|
||||
content.Add(new MessagePlaceholder("Score has no statistics :("));
|
||||
{
|
||||
content.Add(new FillFlowContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Vertical,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new MessagePlaceholder("Extended statistics are only available after watching a replay!"),
|
||||
new ReplayDownloadButton(newScore)
|
||||
{
|
||||
Scale = new Vector2(1.5f),
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
},
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
spinner.Show();
|
||||
|
Loading…
Reference in New Issue
Block a user