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

Support "wasPressed" and "wasReleased" for Gamepad input #2460

Closed
mattjennings opened this issue Aug 12, 2022 · 3 comments · Fixed by #2461
Closed

Support "wasPressed" and "wasReleased" for Gamepad input #2460

mattjennings opened this issue Aug 12, 2022 · 3 comments · Fixed by #2461

Comments

@mattjennings
Copy link
Contributor

Context

It would be helpful if engine.inputs.gamepad supported wasPressed and wasHeld the same way engine.inputs.keyboard does. This would make it easier to interchangeably support keyboard or gamepad input.

Proposal

Add wasPressed(button) and wasReleased(button) to gamepad input API. Perhaps rename isButtonPressed() to isButtonHeld() to closer match keyboard API (isKeyHeld())

@ewal
Copy link

ewal commented Aug 13, 2022

+1 on this

@eonarheim
Copy link
Member

@mattjennings I think this is a great idea! I fully support this

@eonarheim
Copy link
Member

I'd be in favor of increased consistency between the keyboard & gamepad API.

We can mark the isButtonPressed() as @deprecated and will be removed in v0.28.0

eonarheim pushed a commit that referenced this issue Aug 13, 2022
…2461)

Closes #2460

## Changes:

- add support for gamepad wasButtonPressed and wasButtonReleased
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants