Skip to content
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

[3.x] Augment the InputEvent class with a CANCELED state #76715

Merged

Conversation

m4gr3d
Copy link
Contributor

@m4gr3d m4gr3d commented May 3, 2023

The InputEvent class currently supports the pressed and released states, which given the binary nature, is represented by a bool field.
This PR introduces the CANCELED state, which signals that an ongoing input event has been canceled.
To represent all the states, the InputEventState enum is added and the InputEvent logic is refactored accordingly.

Fixes #75144
Address #74199

main version

@m4gr3d m4gr3d added this to the 3.6 milestone May 3, 2023
@m4gr3d m4gr3d requested review from a team as code owners May 3, 2023 22:13
@m4gr3d m4gr3d force-pushed the add_input_event_cancelled_state_3x branch 3 times, most recently from be12f6d to 88f4e88 Compare May 4, 2023 00:15
@m4gr3d m4gr3d force-pushed the add_input_event_cancelled_state_3x branch 5 times, most recently from f48c4d7 to aee9b68 Compare May 8, 2023 02:17
core/os/input_event.cpp Outdated Show resolved Hide resolved
@m4gr3d m4gr3d force-pushed the add_input_event_cancelled_state_3x branch from aee9b68 to 5e0ae5e Compare May 8, 2023 17:10
@m4gr3d m4gr3d changed the title [3.x] Augment the InputEvent class with a CANCELLED state [3.x] Augment the InputEvent class with a CANCELED state May 8, 2023
@m4gr3d
Copy link
Contributor Author

m4gr3d commented May 12, 2023

@RandomShaper @akien-mga Ping on the 3.x version for #76719

@m4gr3d m4gr3d requested a review from RandomShaper May 12, 2023 11:04
@m4gr3d m4gr3d force-pushed the add_input_event_cancelled_state_3x branch 2 times, most recently from fb934e1 to 12c8cee Compare May 12, 2023 18:02
The `InputEvent` class currently supports the `pressed` and `released` states, which given the binary nature, is represented by a `bool` field.
This commit introduced the `CANCELED` state, which signals that an ongoing input event has been canceled.
To represent all the states, the `InputEventState` enum is added and the `InputEvent` logic is refactored accordingly.
@m4gr3d m4gr3d force-pushed the add_input_event_cancelled_state_3x branch from 12c8cee to 94d6c3d Compare May 12, 2023 22:23
@akien-mga akien-mga merged commit 1538b87 into godotengine:3.x May 17, 2023
@akien-mga
Copy link
Member

Thanks!

@m4gr3d m4gr3d deleted the add_input_event_cancelled_state_3x branch May 17, 2023 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants