// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics.Containers; using osu.Game.Rulesets.Mania.Beatmaps; using osu.Game.Rulesets.Mania.UI; using osu.Game.Skinning; namespace osu.Game.Rulesets.Mania.Skinning { /// /// A which is placed somewhere within a . /// public class LegacyManiaColumnElement : CompositeDrawable { [Resolved] protected Column Column { get; private set; } /// /// The column type identifier to use for texture lookups, in the case of no user-provided configuration. /// protected string FallbackColumnIndex { get; private set; } [BackgroundDependencyLoader] private void load() { switch (Column.ColumnType) { case ColumnType.Special: FallbackColumnIndex = "S"; break; case ColumnType.Odd: FallbackColumnIndex = "1"; break; case ColumnType.Even: FallbackColumnIndex = "2"; break; } } protected IBindable GetManiaSkinConfig(ISkin skin, LegacyManiaSkinConfigurationLookups lookup, int? index = null) => skin.GetManiaSkinConfig(lookup, index ?? Column.Index); } }