2020-03-31 06:10:15 +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.Allocation;
|
2020-03-31 09:08:05 +00:00
|
|
|
using osu.Framework.Bindables;
|
2020-03-31 06:10:15 +00:00
|
|
|
using osu.Framework.Graphics.Containers;
|
2020-03-31 14:58:04 +00:00
|
|
|
using osu.Game.Rulesets.Mania.Beatmaps;
|
2020-03-31 06:10:15 +00:00
|
|
|
using osu.Game.Rulesets.Mania.UI;
|
2020-03-31 09:08:05 +00:00
|
|
|
using osu.Game.Skinning;
|
2020-03-31 06:10:15 +00:00
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Mania.Skinning
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// A <see cref="CompositeDrawable"/> which is placed somewhere within a <see cref="Column"/>.
|
|
|
|
/// </summary>
|
2020-03-31 09:54:51 +00:00
|
|
|
public class LegacyManiaColumnElement : LegacyManiaElement
|
2020-03-31 06:10:15 +00:00
|
|
|
{
|
|
|
|
[Resolved]
|
|
|
|
protected Column Column { get; private set; }
|
|
|
|
|
|
|
|
/// <summary>
|
2020-03-31 14:58:04 +00:00
|
|
|
/// The column type identifier to use for texture lookups, in the case of no user-provided configuration.
|
2020-03-31 06:10:15 +00:00
|
|
|
/// </summary>
|
2020-03-31 14:58:04 +00:00
|
|
|
protected string FallbackColumnIndex { get; private set; }
|
2020-03-31 06:10:15 +00:00
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load()
|
|
|
|
{
|
2020-04-01 02:59:34 +00:00
|
|
|
switch (Column.ColumnType)
|
|
|
|
{
|
|
|
|
case ColumnType.Special:
|
|
|
|
FallbackColumnIndex = "S";
|
|
|
|
break;
|
2020-03-31 14:58:04 +00:00
|
|
|
|
2020-04-01 02:59:34 +00:00
|
|
|
case ColumnType.Odd:
|
|
|
|
FallbackColumnIndex = "1";
|
|
|
|
break;
|
2020-03-31 14:58:04 +00:00
|
|
|
|
2020-04-01 02:59:34 +00:00
|
|
|
case ColumnType.Even:
|
|
|
|
FallbackColumnIndex = "2";
|
|
|
|
break;
|
|
|
|
}
|
2020-03-31 06:10:15 +00:00
|
|
|
}
|
2020-03-31 09:08:05 +00:00
|
|
|
|
2020-03-31 09:58:29 +00:00
|
|
|
protected override IBindable<T> GetManiaSkinConfig<T>(ISkin skin, LegacyManiaSkinConfigurationLookups lookup, int? index = null)
|
|
|
|
=> base.GetManiaSkinConfig<T>(skin, lookup, index ?? Column.Index);
|
2020-03-31 06:10:15 +00:00
|
|
|
}
|
|
|
|
}
|