1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-09 09:37:42 +08:00
osu-lazer/osu.Game/Screens/Ranking/Expanded/Statistics/HitResultStatistic.cs

28 lines
793 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.
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
}
}
}