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

Merge merge-inputmanager into main #14

Merged
merged 4 commits into from
May 10, 2021
Merged

Merge merge-inputmanager into main #14

merged 4 commits into from
May 10, 2021

Conversation

lucasstarsz
Copy link
Member

@lucasstarsz lucasstarsz commented May 10, 2021

Simplify the InputManager class

Fixes #13

Additions

  • Replaced use of several event-firing methods (e.g. fireKeyReleased, fireKeyPressed) with a single, multi-purpose method (e.g. fireKeyEvent) and a map containing the different actions to complete depending on the event type.

Breaking Changes

See additions -- all event-firing methods in the InputManager have been removed:

  • fireKeyPressed
  • fireKeyReleased
  • fireKeyTyped
  • fireMousePressed
  • fireMouseReleased
  • fireMouseClicked
  • fireMouseMoved
  • fireMouseDragged
  • fireMouseWheelScrolled
  • fireMouseEntered
  • fireMouseExited

and replaced with these:

  • fireKeyEvent
  • fireMouseEvent

where each key method removed corresponds to the fireKeyEvent method, and each mouse method removed corresponds to the fireMouseEvent method.

Other Changes

  • Replaced calls to the old event fire methods in the Mouse class with the fireMouseEvent method.

@sonarcloud
Copy link

sonarcloud bot commented May 10, 2021

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.

[Feature Request] Simplify InputManager
1 participant