-
-
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
Extend Touches
with clear and reset methods
#10930
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.
Looks good! I'm annoyed about the incoherent APIs here: ideally we can create a less duplicative abstraction somehow.
clear_just_pressed
in Touches
Touches
with clear and reset methods
@alice-i-cecile I somewhat rebranded this PR. Today I saw that there are similar missing methods that should be added, and thought that they should be in the same PR. |
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.
Even better!
2730654
to
dd90483
Compare
Rebased because #11128 got merged |
Objective
Touches
with methods that are implemented onButtonInput
.Solution
clear_just_pressed
that clears thejust_pressed
state of the touch input.clear_just_released
that clears thejust_released
state of the touch input.clear_just_canceled
that clears thejust_canceled
state of the touch input.release
that changes state of the touch input frompressed
tojust_released
.release_all
that changes state of every touch input frompressed
tojust_released
clear
that clearsjust_pressed
,just_released
andjust_canceled
data for every input.reset_all
that clearspressed
,just_pressed
,just_released
andjust_canceled
data for every input.