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

GD-401: Support action input events on scene runner #398

Merged
merged 2 commits into from
Apr 19, 2024

Conversation

rsubtil
Copy link
Contributor

@rsubtil rsubtil commented Apr 17, 2024

Why

Closes #401

(as suggested on Discord)
Using generic action events is better as unit tests don't get tied to a specific key in the project for any given action. Furthermore, it also support actions that only have controller inputs.

What

Adds methods for a scene runner to also support action events.

Oddly though, I'm not getting any luck in implementing unit testing for this feature on the addon's tests. This works as expected on the tests in my project, but for some reason Input.is_action_pressed AFAICT never returns true on the unit tests. I also see there is a test test_simulate_keypressed_as_action doing something similar and is also failing though. EDIT: Fixed by @MikeSchulze ❤️

@MikeSchulze
Copy link
Owner

MikeSchulze commented Apr 17, 2024

@rsubtil thanks for contribution to this project, please create a feature request and link it to the PR.

I completed the input event handling for actions, there was a small piece missing, completing the mission ;)
There was already a prepared code to handle it _handle_actions, I just added to the _handle_input_event and it works.

@rsubtil
Copy link
Contributor Author

rsubtil commented Apr 19, 2024

Thank you so much!

@rsubtil thanks for contribution to this project, please create a feature request and link it to the PR.

I'm not entirely sure how to proceed here. Should I follow what's stated in the CONTRIBUTING.md, and therefore:

  • Create a new issue requesting this feature
  • Mark this PR as closing such issue
  • Rename the PR's prefix to GD-XXX with the issue number

?

@MikeSchulze
Copy link
Owner

Thank you so much!

@rsubtil thanks for contribution to this project, please create a feature request and link it to the PR.

I'm not entirely sure how to proceed here. Should I follow what's stated in the CONTRIBUTING.md, and therefore:

  • Create a new issue requesting this feature
  • Mark this PR as closing such issue
  • Rename the PR's prefix to GD-XXX with the issue number

?

Yes, just follow the contribution guidelines ;)
the normal workflow is

  • first, create a bug or feature issue
  • second, open a new PR and assign the issue to it
  • if the pr approved, it will automatically close the linked issue

At least, the issues are used to build the release nodes when publishing a new release.

Thank you.

@rsubtil rsubtil changed the title Support action input events on scene runner GD-401: Support action input events on scene runner Apr 19, 2024
@rsubtil
Copy link
Contributor Author

rsubtil commented Apr 19, 2024

@MikeSchulze thank you, I've created and assigned the issue to this PR now.

@MikeSchulze MikeSchulze merged commit e1554c6 into MikeSchulze:master Apr 19, 2024
@rsubtil rsubtil deleted the support_action_events branch April 19, 2024 13:57
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 this pull request may close these issues.

GD-401: Support action input events on scene runner
2 participants