Add `OsuSkinComponents.CursorParticles`

This commit is contained in:
Opelkuh 2021-09-10 00:29:05 +02:00
parent cfcb46034c
commit 8862d3fa1e
3 changed files with 5 additions and 6 deletions

View File

@ -9,6 +9,7 @@ public enum OsuSkinComponents
FollowPoint,
Cursor,
CursorTrail,
CursorParticles,
SliderScorePoint,
ReverseArrow,
HitCircleText,

View File

@ -89,6 +89,9 @@ public override Drawable GetDrawableComponent(ISkinComponent component)
return null;
case OsuSkinComponents.CursorParticles:
return new LegacyCursorStarParticles();
case OsuSkinComponents.HitCircleText:
if (!this.HasFont(LegacyFont.HitCircle))
return null;

View File

@ -11,7 +11,6 @@
using osu.Game.Beatmaps;
using osu.Game.Configuration;
using osu.Game.Rulesets.Osu.Configuration;
using osu.Game.Rulesets.Osu.Skinning.Legacy;
using osu.Game.Rulesets.UI;
using osu.Game.Screens.Play;
using osu.Game.Skinning;
@ -46,11 +45,7 @@ public OsuCursorContainer()
Children = new[]
{
cursorTrail = new SkinnableDrawable(new OsuSkinComponent(OsuSkinComponents.CursorTrail), _ => new DefaultCursorTrail(), confineMode: ConfineMode.NoScaling),
new LegacyCursorStarParticles()
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
},
new SkinnableDrawable(new OsuSkinComponent(OsuSkinComponents.CursorParticles), confineMode: ConfineMode.NoScaling),
}
};
}