2022-10-05 21:41:20 +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.
|
|
|
|
|
|
|
|
using osu.Framework.Bindables;
|
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
using osu.Game.Skinning;
|
|
|
|
using osuTK.Graphics;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Mania.Skinning.Legacy
|
|
|
|
{
|
|
|
|
public class ManiaClassicSkinTransformer : ManiaLegacySkinTransformer
|
|
|
|
{
|
|
|
|
public ManiaClassicSkinTransformer(ISkin skin, IBeatmap beatmap)
|
|
|
|
: base(skin, beatmap)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2022-11-09 12:37:04 +08:00
|
|
|
public override IBindable<TValue>? GetConfig<TLookup, TValue>(TLookup lookup)
|
2022-10-05 21:41:20 +08:00
|
|
|
{
|
|
|
|
if (lookup is ManiaSkinConfigurationLookup maniaLookup)
|
|
|
|
{
|
|
|
|
var baseLookup = base.GetConfig<TLookup, TValue>(lookup);
|
|
|
|
|
|
|
|
if (baseLookup != null)
|
|
|
|
return baseLookup;
|
|
|
|
|
|
|
|
// default provisioning.
|
|
|
|
switch (maniaLookup.Lookup)
|
|
|
|
{
|
|
|
|
case LegacyManiaSkinConfigurationLookups.ColumnBackgroundColour:
|
|
|
|
return SkinUtils.As<TValue>(new Bindable<Color4>(Color4.Black));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return base.GetConfig<TLookup, TValue>(lookup);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|