// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using System.Linq; using osu.Game.Rulesets.Judgements; using osu.Game.Rulesets.Scoring; namespace osu.Game.Skinning { /// /// A lookup type intended for use for skinnable gameplay components (not HUD level components). /// /// /// The most common usage of this class is for ruleset-specific skinning implementations, but it can also be used directly /// (see 's usage for ) where ruleset-agnostic elements are required. /// /// An enum lookup type. public class GameplaySkinComponentLookup : ISkinComponentLookup where T : Enum { public readonly T Component; public GameplaySkinComponentLookup(T component) { Component = component; } protected virtual string RulesetPrefix => string.Empty; protected virtual string ComponentName => Component.ToString(); public string LookupName => string.Join('/', new[] { "Gameplay", RulesetPrefix, ComponentName }.Where(s => !string.IsNullOrEmpty(s))); } }