mirror of
https://github.com/ppy/osu
synced 2025-02-08 14:17:29 +00:00
Implement column background and light colours
This commit is contained in:
parent
9fd73492ca
commit
11d58fb7f6
@ -50,12 +50,18 @@ namespace osu.Game.Rulesets.Mania.Skinning
|
||||
Color4 lineColour = GetManiaSkinConfig<Color4>(skin, LegacyManiaSkinConfigurationLookups.ColumnLineColour)?.Value
|
||||
?? Color4.White;
|
||||
|
||||
Color4 backgroundColour = GetManiaSkinConfig<Color4>(skin, LegacyManiaSkinConfigurationLookups.ColumnBackgroundColour)?.Value
|
||||
?? Color4.Black;
|
||||
|
||||
Color4 lightColour = GetManiaSkinConfig<Color4>(skin, LegacyManiaSkinConfigurationLookups.ColumnLightColour)?.Value
|
||||
?? Color4.White;
|
||||
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = Color4.Black
|
||||
Colour = backgroundColour
|
||||
},
|
||||
new Box
|
||||
{
|
||||
@ -82,6 +88,7 @@ namespace osu.Game.Rulesets.Mania.Skinning
|
||||
{
|
||||
Anchor = Anchor.BottomCentre,
|
||||
Origin = Anchor.BottomCentre,
|
||||
Colour = lightColour,
|
||||
Texture = skin.GetTexture(lightImage),
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Width = 1,
|
||||
|
@ -38,5 +38,7 @@ namespace osu.Game.Skinning
|
||||
ExplosionScale,
|
||||
ColumnLineColour,
|
||||
JudgementLineColour,
|
||||
ColumnBackgroundColour,
|
||||
ColumnLightColour
|
||||
}
|
||||
}
|
||||
|
@ -88,7 +88,8 @@ namespace osu.Game.Skinning
|
||||
|
||||
// todo: this shouldn't really be duplicated here (from ManiaLegacySkinTransformer). we need to come up with a better solution.
|
||||
hasKeyTexture = new Lazy<bool>(() => this.GetAnimation(
|
||||
lookupForMania<string>(new LegacyManiaSkinConfigurationLookup(4, LegacyManiaSkinConfigurationLookups.KeyImage, 0))?.Value ?? "mania-key1", true, true) != null);
|
||||
lookupForMania<string>(new LegacyManiaSkinConfigurationLookup(4, LegacyManiaSkinConfigurationLookups.KeyImage, 0))?.Value ?? "mania-key1", true,
|
||||
true) != null);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
@ -210,6 +211,14 @@ namespace osu.Game.Skinning
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.JudgementLineColour:
|
||||
return SkinUtils.As<TValue>(getCustomColour(existing, "ColourJudgementLine"));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.ColumnBackgroundColour:
|
||||
Debug.Assert(maniaLookup.TargetColumn != null);
|
||||
return SkinUtils.As<TValue>(getCustomColour(existing, $"Colour{maniaLookup.TargetColumn}"));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.ColumnLightColour:
|
||||
Debug.Assert(maniaLookup.TargetColumn != null);
|
||||
return SkinUtils.As<TValue>(getCustomColour(existing, $"ColourLight{maniaLookup.TargetColumn}"));
|
||||
}
|
||||
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user