1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 15:47:26 +08:00

Fix incorrect fallback index being used

This commit is contained in:
smoogipoo 2020-03-31 15:15:49 +09:00
parent 4b05f7ff27
commit 16439f7d8e

View File

@ -14,7 +14,7 @@ using osuTK;
namespace osu.Game.Rulesets.Mania.Skinning namespace osu.Game.Rulesets.Mania.Skinning
{ {
public class LegacyKeyArea : CompositeDrawable, IKeyBindingHandler<ManiaAction> public class LegacyKeyArea : LegacyManiaColumnElement, IKeyBindingHandler<ManiaAction>
{ {
private readonly IBindable<ScrollingDirection> direction = new Bindable<ScrollingDirection>(); private readonly IBindable<ScrollingDirection> direction = new Bindable<ScrollingDirection>();
@ -36,15 +36,13 @@ namespace osu.Game.Rulesets.Mania.Skinning
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(ISkinSource skin, IScrollingInfo scrollingInfo) private void load(ISkinSource skin, IScrollingInfo scrollingInfo)
{ {
int fallbackColumn = column.Index % 2 + 1;
string upImage = skin.GetConfig<LegacyManiaSkinConfigurationLookup, string>( string upImage = skin.GetConfig<LegacyManiaSkinConfigurationLookup, string>(
new LegacyManiaSkinConfigurationLookup(stage?.Columns.Count ?? 4, LegacyManiaSkinConfigurationLookups.KeyImage, column.Index))?.Value new LegacyManiaSkinConfigurationLookup(stage?.Columns.Count ?? 4, LegacyManiaSkinConfigurationLookups.KeyImage, column.Index))?.Value
?? $"mania-key{fallbackColumn}"; ?? $"mania-key{FallbackColumnIndex}";
string downImage = skin.GetConfig<LegacyManiaSkinConfigurationLookup, string>( string downImage = skin.GetConfig<LegacyManiaSkinConfigurationLookup, string>(
new LegacyManiaSkinConfigurationLookup(stage?.Columns.Count ?? 4, LegacyManiaSkinConfigurationLookups.KeyImageDown, column.Index))?.Value new LegacyManiaSkinConfigurationLookup(stage?.Columns.Count ?? 4, LegacyManiaSkinConfigurationLookups.KeyImageDown, column.Index))?.Value
?? $"mania-key{fallbackColumn}D"; ?? $"mania-key{FallbackColumnIndex}D";
InternalChild = directionContainer = new Container InternalChild = directionContainer = new Container
{ {