Implement judgement line colour

This commit is contained in:
smoogipoo 2020-04-07 16:50:08 +09:00
parent 39fd297d7d
commit 9fd73492ca
3 changed files with 10 additions and 1 deletions

View File

@ -10,6 +10,7 @@
using osu.Game.Rulesets.UI.Scrolling;
using osu.Game.Skinning;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Rulesets.Mania.Skinning
{
@ -33,6 +34,9 @@ private void load(ISkinSource skin, IScrollingInfo scrollingInfo)
bool showJudgementLine = GetManiaSkinConfig<bool>(skin, LegacyManiaSkinConfigurationLookups.ShowJudgementLine)?.Value
?? true;
Color4 lineColour = GetManiaSkinConfig<Color4>(skin, LegacyManiaSkinConfigurationLookups.JudgementLineColour)?.Value
?? Color4.White;
InternalChild = directionContainer = new Container
{
Origin = Anchor.CentreLeft,
@ -52,6 +56,7 @@ private void load(ISkinSource skin, IScrollingInfo scrollingInfo)
Anchor = Anchor.CentreLeft,
RelativeSizeAxes = Axes.X,
Height = 1,
Colour = lineColour,
Alpha = showJudgementLine ? 0.9f : 0
}
}

View File

@ -36,6 +36,7 @@ public enum LegacyManiaSkinConfigurationLookups
HoldNoteBodyImage,
ExplosionImage,
ExplosionScale,
ColumnLineColour
ColumnLineColour,
JudgementLineColour,
}
}

View File

@ -207,6 +207,9 @@ private IBindable<TValue> lookupForMania<TValue>(LegacyManiaSkinConfigurationLoo
case LegacyManiaSkinConfigurationLookups.ColumnLineColour:
return SkinUtils.As<TValue>(getCustomColour(existing, "ColourColumnLine"));
case LegacyManiaSkinConfigurationLookups.JudgementLineColour:
return SkinUtils.As<TValue>(getCustomColour(existing, "ColourJudgementLine"));
}
return null;