mirror of
https://github.com/ppy/osu
synced 2024-12-27 17:32:56 +00:00
46 lines
1.1 KiB
C#
46 lines
1.1 KiB
C#
// 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.
|
|
|
|
#nullable disable
|
|
|
|
using Humanizer;
|
|
using osu.Framework.Allocation;
|
|
using osu.Framework.Graphics.Sprites;
|
|
using osu.Framework.Graphics.Textures;
|
|
|
|
namespace osu.Game.Beatmaps
|
|
{
|
|
/// <summary>
|
|
/// A default implementation of an icon used to represent beatmap statistics.
|
|
/// </summary>
|
|
public class BeatmapStatisticIcon : Sprite
|
|
{
|
|
private readonly BeatmapStatisticsIconType iconType;
|
|
|
|
public BeatmapStatisticIcon(BeatmapStatisticsIconType iconType)
|
|
{
|
|
this.iconType = iconType;
|
|
}
|
|
|
|
[BackgroundDependencyLoader]
|
|
private void load(TextureStore textures)
|
|
{
|
|
Texture = textures.Get($"Icons/BeatmapDetails/{iconType.ToString().Kebaberize()}");
|
|
}
|
|
}
|
|
|
|
public enum BeatmapStatisticsIconType
|
|
{
|
|
Accuracy,
|
|
ApproachRate,
|
|
Bpm,
|
|
Circles,
|
|
HpDrain,
|
|
Length,
|
|
OverallDifficulty,
|
|
Size,
|
|
Sliders,
|
|
Spinners,
|
|
}
|
|
}
|