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

28 lines
804 B
C#
Raw Normal View History

2023-06-23 00:37:25 +08:00
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
2020-03-18 16:21:57 +08:00
// 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
{
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
}
}
}