Leafwing-Studios / leafwing-input-manager

A straightforward stateful input manager for the Bevy game engine.
Apache License 2.0
677 stars 104 forks source link

`just_pressed` reports incorrectly for UI interactions #496

Open jnhyatt opened 6 months ago

jnhyatt commented 6 months ago

Version

0.13.3

Operating system & version

Windows 10

Problem and repro

I added a bevy_ui button to my game, wired it up to an action I wanted triggered onjust_pressed, and the action repeats every frame as though I were calling pressed. I have a branch out that updates the ui_driven_actions example to showcase this bug by adding a jump button. The branch can be found here (the branch name is misleading, I haven't fixed this).

Additional information

In my efforts to find a fix, I decided that either InputKind needs a new entry and the UI interaction API needs an overhaul, or a small hack needs to get thrown in update_action_state, or something else entirely. After some discussion, it looks like "something else entirely", possibly based on #483, seems to be the preference.

alice-i-cecile commented 6 months ago

I'd be open to cherrypicking a small hack and doing a point release for this.