From 8f826a3702640fedf73b94127528ebd69e9c469d Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 13 Jul 2023 22:57:04 +0900 Subject: [PATCH] Add skinning support for kiai fountain stars --- osu.Game/Screens/Menu/StarFountain.cs | 2 +- osu.Game/Skinning/LegacySkinTransformer.cs | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Menu/StarFountain.cs b/osu.Game/Screens/Menu/StarFountain.cs index f891e989bb..8aedf3199b 100644 --- a/osu.Game/Screens/Menu/StarFountain.cs +++ b/osu.Game/Screens/Menu/StarFountain.cs @@ -70,7 +70,7 @@ namespace osu.Game.Screens.Menu InternalChildren = new Drawable[] { - new SkinnableSprite("star2") + new SkinnableSprite("Menu/fountain-star") { Anchor = Anchor.Centre, Origin = Anchor.Centre, diff --git a/osu.Game/Skinning/LegacySkinTransformer.cs b/osu.Game/Skinning/LegacySkinTransformer.cs index 367e5bae01..97b0f3a9b5 100644 --- a/osu.Game/Skinning/LegacySkinTransformer.cs +++ b/osu.Game/Skinning/LegacySkinTransformer.cs @@ -2,6 +2,7 @@ // See the LICENCE file in the repository root for full licence text. using osu.Framework.Audio.Sample; +using osu.Framework.Graphics.Textures; using osu.Game.Audio; using osu.Game.Rulesets.Objects.Legacy; using static osu.Game.Skinning.SkinConfiguration; @@ -23,6 +24,18 @@ namespace osu.Game.Skinning { } + public override Texture? GetTexture(string componentName, WrapMode wrapModeS, WrapMode wrapModeT) + { + switch (componentName) + { + case "fountain-star": + componentName = "star2"; + break; + } + + return base.GetTexture(componentName, wrapModeS, wrapModeT); + } + public override ISample? GetSample(ISampleInfo sampleInfo) { if (!(sampleInfo is ConvertHitObjectParser.LegacyHitSampleInfo legacySample))