[Merged by Bors] - input clear should not clear pressed#4418
Closed
mockersf wants to merge 2 commits intobevyengine:mainfrom
Closed
[Merged by Bors] - input clear should not clear pressed#4418mockersf wants to merge 2 commits intobevyengine:mainfrom
mockersf wants to merge 2 commits intobevyengine:mainfrom
Conversation
alice-i-cecile
approved these changes
Apr 4, 2022
Member
alice-i-cecile
left a comment
There was a problem hiding this comment.
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.
hymm
reviewed
Apr 4, 2022
| pub fn clear(&mut self) { | ||
| self.just_pressed.clear(); | ||
| self.just_released.clear(); | ||
| self.pressed.clear(); |
Contributor
There was a problem hiding this comment.
can you leave a comment here about why pressed is not called, so this doesn't get added again?
Member
Author
There was a problem hiding this comment.
I forgot to revert the test change. I added a comment in the test
IceSentry
approved these changes
Apr 4, 2022
alice-i-cecile
approved these changes
Apr 4, 2022
hymm
approved these changes
Apr 4, 2022
Member
|
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! |
Member
|
bors r+ |
bors bot
pushed a commit
that referenced
this pull request
Apr 4, 2022
# 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
Contributor
aevyrie
pushed a commit
to aevyrie/bevy
that referenced
this pull request
Jun 7, 2022
# 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
ItsDoot
pushed a commit
to ItsDoot/bevy
that referenced
this pull request
Feb 1, 2023
# 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
Input<T>.clear()is the method call at the end of each frame for inputs. Clearingpressedin it mean that checking if a key is pressed will always return false