2022-11-09 15:03:29 +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.
|
|
|
|
|
2023-02-16 18:20:06 +08:00
|
|
|
using osu.Game.Rulesets;
|
|
|
|
|
2022-11-09 15:03:29 +08:00
|
|
|
namespace osu.Game.Skinning
|
|
|
|
{
|
2023-02-17 13:18:05 +08:00
|
|
|
/// <summary>
|
|
|
|
/// Represents a lookup of a collection of elements that make up a particular skinnable <see cref="TargetArea"/> of the game.
|
|
|
|
/// </summary>
|
2023-02-15 17:31:55 +08:00
|
|
|
public class SkinComponentsContainerLookup : ISkinComponentLookup
|
2022-11-09 15:03:29 +08:00
|
|
|
{
|
2023-02-17 13:18:05 +08:00
|
|
|
/// <summary>
|
|
|
|
/// The target area / layer of the game for which skin components will be returned.
|
|
|
|
/// </summary>
|
2023-02-15 17:31:55 +08:00
|
|
|
public readonly TargetArea Target;
|
2022-11-09 15:03:29 +08:00
|
|
|
|
2023-02-17 14:00:57 +08:00
|
|
|
public readonly RulesetInfo? Ruleset;
|
2023-02-16 18:20:06 +08:00
|
|
|
|
|
|
|
public string GetSerialisableIdentifier() => Ruleset?.ShortName ?? "global";
|
|
|
|
|
2023-02-17 14:00:57 +08:00
|
|
|
public SkinComponentsContainerLookup(TargetArea target, RulesetInfo? ruleset = null)
|
2022-11-09 15:03:29 +08:00
|
|
|
{
|
2023-02-15 17:31:55 +08:00
|
|
|
Target = target;
|
2023-02-16 18:20:06 +08:00
|
|
|
Ruleset = ruleset;
|
2022-11-09 15:03:29 +08:00
|
|
|
}
|
|
|
|
|
2023-02-17 13:18:05 +08:00
|
|
|
/// <summary>
|
|
|
|
/// Represents a particular area or part of a game screen whose layout can be customised using the skin editor.
|
|
|
|
/// </summary>
|
2023-02-15 17:31:55 +08:00
|
|
|
public enum TargetArea
|
2022-11-09 15:03:29 +08:00
|
|
|
{
|
|
|
|
MainHUDComponents,
|
|
|
|
SongSelect
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|