-
Notifications
You must be signed in to change notification settings - Fork 420
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
ButtonDownInputQueue includes sibling drawables to the one handling it #3625
Comments
This is intentional. Receiving an osu-framework/osu.Framework/Graphics/Drawable.cs Line 2196 in 6697d05
This could be explained better though (XMLDocs reworded?), and the wiki doesn't seem to mention this at all. As for the XMLDocs, I've tried to make a distinction between when Only as a blocker for propagation:Will always be worded in the form of osu-framework/osu.Framework/Graphics/Drawable.cs Line 2104 in 6697d05
osu-framework/osu.Framework/Graphics/Drawable.cs Line 2088 in 6697d05
osu-framework/osu.Framework/Graphics/Drawable.cs Line 2196 in 6697d05
Also as a blocker also for receiving other events:Will always be worded in the form of osu-framework/osu.Framework/Graphics/Drawable.cs Line 2142 in 6697d05
osu-framework/osu.Framework/Graphics/Drawable.cs Line 2167 in 6697d05
osu-framework/osu.Framework/Graphics/Drawable.cs Line 2125 in 6697d05
|
Going to close on the original premise of the issue being intended behaviour. Would accept a separate issue mentioning similar to my above comment regarding documentation. |
Completely forgot that was something we decided on. Definitely should be better documented. |
As the title says, the
ButtonDownInputQueue
inButtonEventManager
includes sibling drawables to the one handling it, which is probably incorrect as the down queue should only include the drawable handling the event and its children that are built to the queue.I presume the logic behind this:
osu-framework/osu.Framework/Input/ButtonEventManager.cs
Lines 75 to 76 in 6697d05
is meant to allow children to receive click events when their parent has handled a mouse button down event, so removing this and letting only the handled drawable to be in the queue will not work well. (osu!lazer becomes unplayable from testing)
Here's a simple reproducing (demonstrating) example:
where it would log (with written comments):
Here's also a test case attachable to
KeyboardInputTest.cs
that would log what the receptor received, same as above. (requires some minor changes to declaration ofKeyDown
andKeyUp
to work).I've tried fixing this by doing some simple algorithm to cut siblings / ancestors of the handler from above, but it turns out to be impossible to do as there's no simple way to tell if a drawable is an ancestor / sibling to another.
So as per above, the only fix I'm finding here is by introducing something like a
ParentDepth
(definitely needs another name) that provides how deep the drawable is in the hierarchy in comparison to another, open for suggestions if I completely missed something that can fix this.The text was updated successfully, but these errors were encountered: