flame-engine / flame-engine/flame
Limit number of simultaneous drags
- Dominant language
- Dart
- Stars
- 10.8k
- Forks
- 1k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 21
Description
# What could be improved
Specifically looking at `DragCallbacks` and the ability to have it so that only 1 (or n) draggable component(s) can be dragged at one time. Think of a chess board and only being allowed to move 1 piece rather than multiple at the same time.
# Why should this be improved
This is currently possible to implement by manually keeping track of the current component being dragged and then returning from `void onDragUpdate(DragUpdateEvent event)`. However, I imagine this is something that is implemented quite a lot and so would be nice for flame to handle it internally, making everything simpler.
# Any risks?
None that I can forsee. Defaults should be provided to keep the behaviour as it is now and have the feature as "opt-in".
# More information
My original question on [SO](https://stackoverflow.com/questions/77057957/exclusive-touch-in-flutter-flamegame/77059450?noredirect=1#comment135852706_77059450)
Contributor guide
Assessment
This issue has not been assessed yet.