1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-27 13:43:21 +08:00
osu-lazer/osu.Game/Screens/Ranking/Expanded/Statistics/HitResultStatistic.cs

30 lines
812 B
C#
Raw Normal View History

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
{
public class HitResultStatistic : CounterStatistic
{
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
}
}
}