1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-08 00:02:54 +08:00

Add skinning support for column line colour

This commit is contained in:
smoogipoo 2020-04-02 18:10:17 +09:00
parent a77933f5e0
commit 62f1bc276d
3 changed files with 9 additions and 0 deletions

View File

@ -46,6 +46,9 @@ namespace osu.Game.Rulesets.Mania.Skinning
new LegacyManiaSkinConfigurationLookup(Stage?.Columns.Count ?? 4, LegacyManiaSkinConfigurationLookups.LightPosition))?.Value new LegacyManiaSkinConfigurationLookup(Stage?.Columns.Count ?? 4, LegacyManiaSkinConfigurationLookups.LightPosition))?.Value
?? 0; ?? 0;
Color4 lineColour = GetManiaSkinConfig<Color4>(skin, LegacyManiaSkinConfigurationLookups.ColumnLineColour)?.Value
?? Color4.White;
InternalChildren = new Drawable[] InternalChildren = new Drawable[]
{ {
new Box new Box
@ -57,6 +60,7 @@ namespace osu.Game.Rulesets.Mania.Skinning
{ {
RelativeSizeAxes = Axes.Y, RelativeSizeAxes = Axes.Y,
Width = leftLineWidth, Width = leftLineWidth,
Colour = lineColour,
Alpha = hasLeftLine ? 1 : 0 Alpha = hasLeftLine ? 1 : 0
}, },
new Box new Box
@ -65,6 +69,7 @@ namespace osu.Game.Rulesets.Mania.Skinning
Origin = Anchor.TopRight, Origin = Anchor.TopRight,
RelativeSizeAxes = Axes.Y, RelativeSizeAxes = Axes.Y,
Width = rightLineWidth, Width = rightLineWidth,
Colour = lineColour,
Alpha = hasRightLine ? 1 : 0 Alpha = hasRightLine ? 1 : 0
}, },
lightContainer = new Container lightContainer = new Container

View File

@ -34,5 +34,6 @@ namespace osu.Game.Skinning
HoldNoteHeadImage, HoldNoteHeadImage,
HoldNoteTailImage, HoldNoteTailImage,
HoldNoteBodyImage, HoldNoteBodyImage,
ColumnLineColour
} }
} }

View File

@ -193,6 +193,9 @@ namespace osu.Game.Skinning
case LegacyManiaSkinConfigurationLookups.ShowJudgementLine: case LegacyManiaSkinConfigurationLookups.ShowJudgementLine:
return SkinUtils.As<TValue>(new Bindable<bool>(existing.ShowJudgementLine)); return SkinUtils.As<TValue>(new Bindable<bool>(existing.ShowJudgementLine));
case LegacyManiaSkinConfigurationLookups.ColumnLineColour:
return SkinUtils.As<TValue>(getCustomColour(existing, "ColourColumnLine"));
} }
return null; return null;