Currently, the code that is related to event handling lives in multiple different locations in Flame's source code tree. It can be found in the following places:
- components/mixins/draggable.dart
- components/mixins/hoverable.dart
- components/mixins/keyboard_handler.dart
- components/mixins/tappable.dart
- game/mixins/has_draggables.dart
- game/mixins/has_hoverables.dart
- game/mixins/has_tappables.dart
- game/mixins/keyboard.dart
- game/mixins/multi_touch_tap_detector.dart
- gestures/detectors.dart
- gestures/events.dart
- events/interfaces/multi_tap_listener.dart
All this functionality is highly related yet lives in multiple places, which increases burden when reading the code.
In addition, when adding new events-related functionality it's hard to figure out where to put it.
Suggestion: move all code related to events handling into the top-level events/
directory, possibly with multiple nesting levels inside for Game mixins, FlameGame mixins, Component mixins, and so on.
No, since we can leave the export structure exactly as it is right now.
Are you interested in working on a PR for this? Yes.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too