`directional_navigation ` and `directional_navigation_override` examples should not handle pointer events
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
Hmm ok the this makes me think that this example actually should *not* react to pointer events at all, since this example is meant to be showcase something specific to console navigation (using a d-pad) or keyboard (tab) navigation. I think the `PointerFocusPlugin`, as it exists now, does what one would expect, so I wouldn’t touch `acquire_focus_tab_index`. Within the example, `interact_with_focus_button` should probably not trigger a `Pointer` then and use some different eventing to trigger the action of a button press.
I’ll create an issue about this that also includes the `directional_navigation_overrides` example since the same problem exists over there.
_Originally posted by @kfc35 in https://github.com/bevyengine/bevy/pull/25008#discussion_r3599042511_
---
To “press” a button in this example, we should not be triggering a `Pointer` on the button. The pointer shouldn’t affect the example at all.
I think this might be deeper than just removing the observer, because the `PointerFocusPlugin` should probably not be installed as well. However, we still want to use a `ui_widgets::Button`.
Contributor guide
Research direction
Find the directional_navigation and directional_navigation_overrides examples, then inspect interact_with_focus_button and the PointerFocusPlugin setup. Verify how the examples currently trigger button presses and run their existing example or UI tests. Done means pointer events do not affect either example while the ui_widgets::Button still responds to directional or keyboard navigation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100