2020-03-18 16:21:57 +08:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
2022-06-17 15:37:17 +08:00
|
|
|
#nullable disable
|
|
|
|
|
2020-03-18 16:21:57 +08:00
|
|
|
using osu.Framework.Allocation;
|
|
|
|
using osu.Game.Graphics;
|
|
|
|
using osu.Game.Rulesets.Scoring;
|
2020-10-07 14:35:04 +08:00
|
|
|
using osu.Game.Scoring;
|
2020-03-18 16:21:57 +08:00
|
|
|
|
|
|
|
namespace osu.Game.Screens.Ranking.Expanded.Statistics
|
|
|
|
{
|
2022-11-24 13:32:20 +08:00
|
|
|
public partial class HitResultStatistic : CounterStatistic
|
2020-03-18 16:21:57 +08:00
|
|
|
{
|
2020-10-07 15:17:08 +08:00
|
|
|
public readonly HitResult Result;
|
2020-03-18 16:21:57 +08:00
|
|
|
|
2020-10-07 14:35:04 +08:00
|
|
|
public HitResultStatistic(HitResultDisplayStatistic result)
|
|
|
|
: base(result.DisplayName, result.Count, result.MaxCount)
|
2020-03-18 16:21:57 +08:00
|
|
|
{
|
2020-10-07 15:17:08 +08:00
|
|
|
Result = result.Result;
|
2020-03-18 16:21:57 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load(OsuColour colours)
|
|
|
|
{
|
2020-10-07 15:17:08 +08:00
|
|
|
HeaderText.Colour = colours.ForHitResult(Result);
|
2020-03-18 16:21:57 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|