Move config retrieval into LegacySliderBall

This commit is contained in:
smoogipoo 2019-12-09 14:43:23 +09:00
parent 340b709e43
commit aff1b93a07
2 changed files with 7 additions and 7 deletions

View File

@ -11,22 +11,22 @@ namespace osu.Game.Rulesets.Osu.Skinning
{
public class LegacyCursor : CompositeDrawable
{
public LegacyCursor(bool spin = true)
private NonPlayfieldSprite cursor;
private bool spin;
public LegacyCursor()
{
Size = new Vector2(50);
Anchor = Anchor.Centre;
Origin = Anchor.Centre;
this.spin = spin;
}
private NonPlayfieldSprite cursor;
private readonly bool spin;
[BackgroundDependencyLoader]
private void load(ISkinSource skin)
{
spin = skin.GetConfig<OsuSkinConfiguration, bool>(OsuSkinConfiguration.CursorRotate)?.Value ?? true;
InternalChildren = new Drawable[]
{
new NonPlayfieldSprite

View File

@ -81,7 +81,7 @@ public Drawable GetDrawableComponent(ISkinComponent component)
case OsuSkinComponents.Cursor:
if (source.GetTexture("cursor") != null)
return new LegacyCursor(GetConfig<OsuSkinConfiguration, bool>(OsuSkinConfiguration.CursorRotate)?.Value ?? true);
return new LegacyCursor();
return null;