mirror of
https://github.com/ppy/osu
synced 2025-01-10 16:19:47 +00:00
Add helper methods for retrieving other skin hyper-dash colours
This commit is contained in:
parent
ee247e58c8
commit
f3bcb0628c
@ -9,6 +9,13 @@ namespace osu.Game.Rulesets.Catch.Skinning
|
|||||||
{
|
{
|
||||||
internal static class CatchSkinExtensions
|
internal static class CatchSkinExtensions
|
||||||
{
|
{
|
||||||
|
public static IBindable<Color4> GetHyperDashCatcherColour(this ISkin skin)
|
||||||
|
=> skin.GetConfig<CatchSkinColour, Color4>(CatchSkinColour.HyperDash);
|
||||||
|
|
||||||
|
public static IBindable<Color4> GetHyperDashEndGlowColour(this ISkin skin)
|
||||||
|
=> skin.GetConfig<CatchSkinColour, Color4>(CatchSkinColour.HyperDashAfterImage) ??
|
||||||
|
skin.GetConfig<CatchSkinColour, Color4>(CatchSkinColour.HyperDash);
|
||||||
|
|
||||||
public static IBindable<Color4> GetHyperDashFruitColour(this ISkin skin)
|
public static IBindable<Color4> GetHyperDashFruitColour(this ISkin skin)
|
||||||
=> skin.GetConfig<CatchSkinColour, Color4>(CatchSkinColour.HyperDashFruit) ??
|
=> skin.GetConfig<CatchSkinColour, Color4>(CatchSkinColour.HyperDashFruit) ??
|
||||||
skin.GetConfig<CatchSkinColour, Color4>(CatchSkinColour.HyperDash);
|
skin.GetConfig<CatchSkinColour, Color4>(CatchSkinColour.HyperDash);
|
||||||
|
@ -389,9 +389,9 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
{
|
{
|
||||||
base.SkinChanged(skin, allowFallback);
|
base.SkinChanged(skin, allowFallback);
|
||||||
|
|
||||||
hyperDashColour = skin.GetConfig<CatchSkinColour, Color4>(CatchSkinColour.HyperDash)?.Value ?? DefaultHyperDashColour;
|
|
||||||
hyperDashEndGlowColour = skin.GetConfig<CatchSkinColour, Color4>(CatchSkinColour.HyperDashAfterImage)?.Value ?? hyperDashColour;
|
|
||||||
updateCatcherColour();
|
updateCatcherColour();
|
||||||
|
hyperDashColour = skin.GetHyperDashCatcherColour()?.Value ?? DefaultHyperDashColour;
|
||||||
|
hyperDashEndGlowColour = skin.GetHyperDashEndGlowColour()?.Value ?? DefaultHyperDashColour;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
|
Loading…
Reference in New Issue
Block a user