-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Merged by Bors] - input clear should not clear pressed #4418
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately I agree with this reversion: that's a nasty bug.
I suspect the real fix to the original issue will involve dedicate input mocking tools.
@@ -120,7 +120,6 @@ where | |||
pub fn clear(&mut self) { | |||
self.just_pressed.clear(); | |||
self.just_released.clear(); | |||
self.pressed.clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you leave a comment here about why pressed is not called, so this doesn't get added again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot to revert the test change. I added a comment in the test
Oops! This is my bad for pressing the merge button. Should have thought about this a bit more. @mockersf thanks for catching this / holding the quality bar high! |
bors r+ |
# Objective - Revert #4410 - `Input<T>.clear()` is the method call at the end of each frame for inputs. Clearing `pressed` in it mean that checking if a key is pressed will always return false
# Objective - Revert bevyengine#4410 - `Input<T>.clear()` is the method call at the end of each frame for inputs. Clearing `pressed` in it mean that checking if a key is pressed will always return false
# Objective - Revert bevyengine#4410 - `Input<T>.clear()` is the method call at the end of each frame for inputs. Clearing `pressed` in it mean that checking if a key is pressed will always return false
Objective
Input<T>.clear()
is the method call at the end of each frame for inputs. Clearingpressed
in it mean that checking if a key is pressed will always return false