Skip to content

Conversation

rh101
Copy link
Contributor

@rh101 rh101 commented Jun 4, 2023

Describe your changes

Just prior to dispatching an event, the event dispatcher creates a sorted list of nodes based on their Z position. This was never factoring in nodes of type ProtectedNode, so it meant that touch events would not be sent to such nodes ahead of their parent node. If the parent node happens to block propagation of events, then the protected child nodes would never receive any touch events, which is not correct.

More info here.

Note that the Tab Control UI test has been adapted to show that this functionality now works. Without the changes to ProtectedNode and EventDispatcher, the tab controls in the test cannot be activated, since no touch event is sent to them.

Issue ticket number and link

#1221

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.
  • I have checked readme and add important infos to this PR (if it needed).
  • I have added/adapted some tests too.

rh101 added 30 commits August 11, 2022 03:08
Fix update override warning
Improve code
@rh101 rh101 marked this pull request as draft June 4, 2023 13:18
@rh101 rh101 mentioned this pull request Jun 4, 2023
rh101 added 3 commits June 5, 2023 00:41
…ll correctly receive touch input even if parent node is not propagating touches.
@rh101 rh101 marked this pull request as ready for review June 4, 2023 15:10
@halx99 halx99 merged commit c49aab2 into axmolengine:dev Jun 5, 2023
@rh101 rh101 deleted the event-dispatcher-fix branch June 5, 2023 09:21
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.

2 participants