mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 23:23:52 +08:00
parent
60048e6cd1
commit
5fd3115142
@ -101,14 +101,21 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
|||||||
// If the current time is between the start and end of the slider, we should track mouse input regardless of the cursor position.
|
// If the current time is between the start and end of the slider, we should track mouse input regardless of the cursor position.
|
||||||
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => canCurrentlyTrack || base.ReceiveMouseInputAt(screenSpacePos);
|
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => canCurrentlyTrack || base.ReceiveMouseInputAt(screenSpacePos);
|
||||||
|
|
||||||
|
public override void ClearTransforms(bool propagateChildren = false, string targetMember = null)
|
||||||
|
{
|
||||||
|
// Consider the case of rewinding - children's transforms are handled internally, so propagating down
|
||||||
|
// any further will cause weirdness with the Tracking bool below. Let's not propagate further at this point.
|
||||||
|
base.ClearTransforms(false, targetMember);
|
||||||
|
}
|
||||||
|
|
||||||
private bool tracking;
|
private bool tracking;
|
||||||
public bool Tracking
|
public bool Tracking
|
||||||
{
|
{
|
||||||
get { return tracking; }
|
get { return tracking; }
|
||||||
private set
|
private set
|
||||||
{
|
{
|
||||||
if (value == tracking) return;
|
if (value == tracking)
|
||||||
|
return;
|
||||||
tracking = value;
|
tracking = value;
|
||||||
|
|
||||||
follow.ScaleTo(tracking ? 2.8f : 1, 300, Easing.OutQuint);
|
follow.ScaleTo(tracking ? 2.8f : 1, 300, Easing.OutQuint);
|
||||||
@ -123,8 +130,10 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
|||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
// Make sure to use the base version of ReceiveMouseInputAt so that we correctly check the position.
|
// Make sure to use the base version of ReceiveMouseInputAt so that we correctly check the position.
|
||||||
if (Time.Current < slider.EndTime)
|
Tracking = canCurrentlyTrack
|
||||||
Tracking = canCurrentlyTrack && lastState != null && base.ReceiveMouseInputAt(lastState.Mouse.NativeState.Position) && ((Parent as DrawableSlider)?.OsuActionInputManager?.PressedActions.Any(x => x == OsuAction.LeftButton || x == OsuAction.RightButton) ?? false);
|
&& lastState != null
|
||||||
|
&& base.ReceiveMouseInputAt(lastState.Mouse.NativeState.Position)
|
||||||
|
&& ((Parent as DrawableSlider)?.OsuActionInputManager?.PressedActions.Any(x => x == OsuAction.LeftButton || x == OsuAction.RightButton) ?? false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateProgress(double progress, int repeat)
|
public void UpdateProgress(double progress, int repeat)
|
||||||
|
Loading…
Reference in New Issue
Block a user