mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 15:47:26 +08:00
Merge pull request #27517 from Joehuu/fix-failed-s-accuracy-circle
Fix results screen accuracy circle not showing correctly for failed S with no flair
This commit is contained in:
commit
74e3c47c2f
@ -88,8 +88,20 @@ namespace osu.Game.Tests.Visual.Ranking
|
|||||||
AddAssert("play time not displayed", () => !this.ChildrenOfType<ExpandedPanelMiddleContent.PlayedOnText>().Any());
|
AddAssert("play time not displayed", () => !this.ChildrenOfType<ExpandedPanelMiddleContent.PlayedOnText>().Any());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showPanel(ScoreInfo score) =>
|
[Test]
|
||||||
Child = new ExpandedPanelMiddleContentContainer(score);
|
public void TestFailedSDisplay([Values] bool withFlair)
|
||||||
|
{
|
||||||
|
AddStep("show failed S score", () =>
|
||||||
|
{
|
||||||
|
var score = TestResources.CreateTestScoreInfo(createTestBeatmap(new RealmUser()));
|
||||||
|
score.Rank = ScoreRank.A;
|
||||||
|
score.Accuracy = 0.975;
|
||||||
|
showPanel(score, withFlair);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showPanel(ScoreInfo score, bool withFlair = false) =>
|
||||||
|
Child = new ExpandedPanelMiddleContentContainer(score, withFlair);
|
||||||
|
|
||||||
private BeatmapInfo createTestBeatmap([NotNull] RealmUser author)
|
private BeatmapInfo createTestBeatmap([NotNull] RealmUser author)
|
||||||
{
|
{
|
||||||
@ -107,7 +119,7 @@ namespace osu.Game.Tests.Visual.Ranking
|
|||||||
|
|
||||||
private partial class ExpandedPanelMiddleContentContainer : Container
|
private partial class ExpandedPanelMiddleContentContainer : Container
|
||||||
{
|
{
|
||||||
public ExpandedPanelMiddleContentContainer(ScoreInfo score)
|
public ExpandedPanelMiddleContentContainer(ScoreInfo score, bool withFlair)
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre;
|
Anchor = Anchor.Centre;
|
||||||
Origin = Anchor.Centre;
|
Origin = Anchor.Centre;
|
||||||
@ -119,7 +131,7 @@ namespace osu.Game.Tests.Visual.Ranking
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = Color4Extensions.FromHex("#444"),
|
Colour = Color4Extensions.FromHex("#444"),
|
||||||
},
|
},
|
||||||
new ExpandedPanelMiddleContent(score)
|
new ExpandedPanelMiddleContent(score, withFlair)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -194,11 +194,11 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
|
|||||||
rankText = new RankText(score.Rank)
|
rankText = new RankText(score.Rank)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (withFlair)
|
|
||||||
{
|
|
||||||
if (isFailedSDueToMisses)
|
if (isFailedSDueToMisses)
|
||||||
AddInternal(failedSRankText = new RankText(ScoreRank.S));
|
AddInternal(failedSRankText = new RankText(ScoreRank.S));
|
||||||
|
|
||||||
|
if (withFlair)
|
||||||
|
{
|
||||||
var applauseSamples = new List<string> { applauseSampleName };
|
var applauseSamples = new List<string> { applauseSampleName };
|
||||||
if (score.Rank >= ScoreRank.B)
|
if (score.Rank >= ScoreRank.B)
|
||||||
// when rank is B or higher, play legacy applause sample on legacy skins.
|
// when rank is B or higher, play legacy applause sample on legacy skins.
|
||||||
@ -326,8 +326,8 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
|
|||||||
{
|
{
|
||||||
rankText.Appear();
|
rankText.Appear();
|
||||||
|
|
||||||
if (!withFlair) return;
|
if (withFlair)
|
||||||
|
{
|
||||||
Schedule(() =>
|
Schedule(() =>
|
||||||
{
|
{
|
||||||
isTicking = false;
|
isTicking = false;
|
||||||
@ -346,6 +346,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (isFailedSDueToMisses)
|
if (isFailedSDueToMisses)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user