1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 14:37:30 +08:00

Merge pull request #30346 from wezwery/perfect-combo-and-accuracy-highlighted

Highlight maximum combo and accuracy on user best score display to match web
This commit is contained in:
Bartłomiej Dach 2024-10-21 15:34:03 +02:00 committed by GitHub
commit 455ed0607f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 25 additions and 1 deletions

View File

@ -147,6 +147,18 @@ namespace osu.Game.Tests.Visual.Online
AddUntilStep("wait for scores displayed", () => scoresContainer.ChildrenOfType<ScoreTableRowBackground>().Any());
AddAssert("best score displayed", () => scoresContainer.ChildrenOfType<DrawableTopScore>().Count() == 2);
AddStep("Load scores with personal best FC", () =>
{
var allScores = createScores();
allScores.UserScore = createUserBest();
allScores.UserScore.Score.Accuracy = 1;
scoresContainer.Beatmap.Value.MaxCombo = allScores.UserScore.Score.MaxCombo = 1337;
scoresContainer.Scores = allScores;
});
AddUntilStep("wait for scores displayed", () => scoresContainer.ChildrenOfType<ScoreTableRowBackground>().Any());
AddAssert("best score displayed", () => scoresContainer.ChildrenOfType<DrawableTopScore>().Count() == 2);
AddStep("Load scores with personal best (null position)", () =>
{
var allScores = createScores();

View File

@ -96,10 +96,17 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
}
[BackgroundDependencyLoader]
private void load()
private void load(OsuColour colours)
{
if (score != null)
{
totalScoreColumn.Current = scoreManager.GetBindableTotalScoreString(score);
if (score.Accuracy == 1.0) accuracyColumn.TextColour = colours.GreenLight;
#pragma warning disable CS0618
if (score.MaxCombo == score.BeatmapInfo!.MaxCombo) maxComboColumn.TextColour = colours.GreenLight;
#pragma warning restore CS0618
}
}
private ScoreInfo score;
@ -228,6 +235,11 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
set => text.Text = value;
}
public Colour4 TextColour
{
set => text.Colour = value;
}
public Drawable Drawable
{
set