diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSpinner.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSpinner.cs index 4a0b8422f1..307ef5d636 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSpinner.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSpinner.cs @@ -1,6 +1,7 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using System.Linq; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Rulesets.Objects.Drawables; @@ -165,6 +166,13 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables glow.Colour = colours.BlueDark; } + protected override void Update() + { + disc.Tracking = OsuActionInputManager.PressedActions.Any(x => x == OsuAction.LeftButton || x == OsuAction.RightButton); + + base.Update(); + } + protected override void UpdateAfterChildren() { base.UpdateAfterChildren(); diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SpinnerDisc.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SpinnerDisc.cs index 1e56a2559a..80d4391718 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SpinnerDisc.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SpinnerDisc.cs @@ -12,7 +12,7 @@ using OpenTK.Graphics; namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces { - public class SpinnerDisc : CircularContainer, IHasAccentColour, IKeyBindingHandler + public class SpinnerDisc : CircularContainer, IHasAccentColour { private readonly Spinner spinner; @@ -73,39 +73,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces return base.OnMouseMove(state); } - public bool OnPressed(OsuAction action) - { - switch (action) - { - case OsuAction.LeftButton: - actionLeftButtonPressed = true; - break; - case OsuAction.RightButton: - actionRightButtonPressed = true; - break; - } - Tracking = actionLeftButtonPressed || actionRightButtonPressed; - return false; - } - - public bool OnReleased(OsuAction action) - { - switch (action) - { - case OsuAction.LeftButton: - actionLeftButtonPressed = false; - break; - case OsuAction.RightButton: - actionRightButtonPressed = false; - break; - } - Tracking = actionLeftButtonPressed || actionRightButtonPressed; - return false; - } - private Vector2 mousePosition; - private bool actionLeftButtonPressed; - private bool actionRightButtonPressed; private float lastAngle; private float currentRotation;