Add skinning support for kiai fountain stars

This commit is contained in:
Dean Herbert 2023-07-13 22:57:04 +09:00
parent 53fccaa3bd
commit 8f826a3702
2 changed files with 14 additions and 1 deletions

View File

@ -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,

View File

@ -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))