mirror of
https://github.com/ppy/osu.git
synced 2025-01-08 22:02:56 +08:00
Add support for special column
This commit is contained in:
parent
c9a81e7f71
commit
44fcd2613f
@ -5,6 +5,7 @@ using System;
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Game.Rulesets.Mania.Beatmaps;
|
||||||
using osu.Game.Rulesets.Mania.UI;
|
using osu.Game.Rulesets.Mania.UI;
|
||||||
using osu.Game.Skinning;
|
using osu.Game.Skinning;
|
||||||
|
|
||||||
@ -19,20 +20,30 @@ namespace osu.Game.Rulesets.Mania.Skinning
|
|||||||
protected Column Column { get; private set; }
|
protected Column Column { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The column index to use for texture lookups, in the case of no user-provided configuration.
|
/// The column type identifier to use for texture lookups, in the case of no user-provided configuration.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected int FallbackColumnIndex { get; private set; }
|
protected string FallbackColumnIndex { get; private set; }
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
if (Stage == null)
|
if (Stage == null)
|
||||||
FallbackColumnIndex = Column.Index % 2 + 1;
|
FallbackColumnIndex = (Column.Index % 2 + 1).ToString();
|
||||||
else
|
else
|
||||||
{
|
switch (Column.ColumnType)
|
||||||
int dist = Math.Min(Column.Index, Stage.Columns.Count - Column.Index - 1);
|
{
|
||||||
FallbackColumnIndex = dist % 2 + 1;
|
case ColumnType.Special:
|
||||||
}
|
FallbackColumnIndex = "S";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ColumnType.Odd:
|
||||||
|
FallbackColumnIndex = "1";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ColumnType.Even:
|
||||||
|
FallbackColumnIndex = "2";
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IBindable<T> GetManiaSkinConfig<T>(ISkin skin, LegacyManiaSkinConfigurationLookups lookup, int? index = null)
|
protected override IBindable<T> GetManiaSkinConfig<T>(ISkin skin, LegacyManiaSkinConfigurationLookups lookup, int? index = null)
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
|
Loading…
Reference in New Issue
Block a user