mirror of
https://github.com/ppy/osu.git
synced 2024-11-12 03:57:25 +08:00
Merge pull request #1110 from swoolcock/fix-spinner-ignoring-actions
Fix spinner not handling left/right action bindings
This commit is contained in:
commit
c0c90f85af
@ -1 +1 @@
|
||||
Subproject commit 5c22092e590d589927962b8d0173dae5f9b1405c
|
||||
Subproject commit 03b7608f210b35dbcd3a811bda002e7a9334d081
|
@ -51,6 +51,9 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
protected virtual void UpdateCurrentState(ArmedState state)
|
||||
{
|
||||
}
|
||||
|
||||
private OsuInputManager osuActionInputManager;
|
||||
internal OsuInputManager OsuActionInputManager => osuActionInputManager ?? (osuActionInputManager = GetContainingInputManager() as OsuInputManager);
|
||||
}
|
||||
|
||||
public enum ComboResult
|
||||
|
@ -1,6 +1,7 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// 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();
|
||||
|
@ -66,21 +66,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||
{
|
||||
Tracking |= state.Mouse.HasMainButtonPressed;
|
||||
return base.OnMouseDown(state, args);
|
||||
}
|
||||
|
||||
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
|
||||
{
|
||||
Tracking &= state.Mouse.HasMainButtonPressed;
|
||||
return base.OnMouseUp(state, args);
|
||||
}
|
||||
|
||||
protected override bool OnMouseMove(InputState state)
|
||||
{
|
||||
Tracking |= state.Mouse.HasMainButtonPressed;
|
||||
mousePosition = Parent.ToLocalSpace(state.Mouse.NativeState.Position);
|
||||
return base.OnMouseMove(state);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user