Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sliders ignoring actions past the initial hitcircle #1115

Merged
merged 2 commits into from
Aug 18, 2017

Conversation

swoolcock
Copy link
Contributor

Previously, actions would correctly trigger the initial hit circle, but were ignored when tracking the ball. This meant that the tracking ring was never displayed, and slider ticks were always counted as a miss.
The fix is to make the slider ball keep track of actions (instead of mouse buttons), and to make hit circles not consume the action if their direct parent is a slider (so that the slider ball will correctly accept the initial OnPressed).

return base.OnMouseUp(state, args);
}

protected override bool OnMouseMove(InputState state)
{
lastState = state;
if (state != null)
lastPosition = state.Mouse.NativeState.Position;

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@@ -42,7 +42,7 @@ public DrawableHitCircle(OsuHitObject h) : base(h)

Judgement.PositionOffset = Vector2.Zero; //todo: set to correct value
UpdateJudgement(true);
return true;
return !(Parent is DrawableSlider);

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@peppy
Copy link
Sponsor Member

peppy commented Aug 17, 2017

The correct fix likely involves exposing PressedActions in KeyBindingInputManager and checking the pressed state of the appropriate actions.

@swoolcock
Copy link
Contributor Author

I wasn't sure if there was a way of publicly checking the currently pressed actions, otherwise I would have done it in a similar way to the old HasMainButtonPressed.

@peppy peppy merged commit 4107264 into ppy:master Aug 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants