1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 05:27:23 +08:00
osu-lazer/osu.Game.Rulesets.Mania/Skinning/ManiaSkinConfigExtensions.cs
Dean Herbert 0d21c0e49c Remove StageDefinition from configuration lookups
I added this for future usage, but it turns out I can get the
definitions directly from `ManiaBeatmap`.
2022-10-07 15:24:36 +09:00

24 lines
989 B
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 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>
/// <param name="columnIndex">If not null, denotes the index of the column to which the entry applies.</param>
public static IBindable<T> GetManiaSkinConfig<T>(this ISkin skin, LegacyManiaSkinConfigurationLookups lookup, int? columnIndex = null)
=> skin.GetConfig<ManiaSkinConfigurationLookup, T>(
new ManiaSkinConfigurationLookup(lookup, columnIndex));
}
}