2020-06-13 15:05:57 +00: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.Bindables;
|
|
|
|
using osu.Game.Skinning;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Mania.Skinning
|
|
|
|
{
|
|
|
|
public static class ManiaSkinConfigExtensions
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Retrieve a per-column-count skin configuration.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="skin">The skin from which configuration is retrieved.</param>
|
|
|
|
/// <param name="lookup">The value to retrieve.</param>
|
2022-10-04 10:42:43 +00:00
|
|
|
/// <param name="columnIndex">If not null, denotes the index of the column to which the entry applies.</param>
|
2022-11-09 04:37:04 +00:00
|
|
|
public static IBindable<T>? GetManiaSkinConfig<T>(this ISkin skin, LegacyManiaSkinConfigurationLookups lookup, int? columnIndex = null)
|
|
|
|
where T : notnull
|
|
|
|
=> skin.GetConfig<ManiaSkinConfigurationLookup, T>(new ManiaSkinConfigurationLookup(lookup, columnIndex));
|
2020-06-13 15:05:57 +00:00
|
|
|
}
|
|
|
|
}
|