mirror of https://github.com/ppy/osu
Move config retrieval into LegacySliderBall
This commit is contained in:
parent
340b709e43
commit
aff1b93a07
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue