Closed msvbg closed 5 months ago
This code has since been removed for the upcoming release, so I'm going to mark this as "fixed" ;)
It looks to me like it's still there on 0.14-rc.2
! https://github.com/Leafwing-Studios/leafwing-input-manager/blob/v0.14-rc/src/systems.rs#L93-L101
Yep, that branch is for a strict Bevy upgrade bump :) I'll be cutting 0.15 right after with all the breaking changes (like #540) that have accumulated on main
.
Version
0.13
What you did
Create an
ImageBundle
, which comes with aFocusPolicy
, and setFocusPolicy::Block
.What you expected to happen
The input should be blocked from interacting with the game world
What actually happened
It doesn't block input events unless I also add
Interaction::None
to the bundle.Additional information
Related to: https://github.com/bevyengine/bevy/issues/13827
The proper solution is perhaps to replace this code https://github.com/Leafwing-Studios/leafwing-input-manager/blob/6ac10268849dbd87ebbfd431479ba0fd15aa66ce/src/systems.rs#L123-L131 with something that traverses the UI nodes and looks for
FocusPolicy
, instead of just detectingInteraction
, which may not always be present.