It would be convenient to propagate PointerHoverEvents to child Components, not just handle them from the base game.
Make a HasCursorHandlerComponents mixin on FlameGame, could be very similar to HasKeyboardHandlerComponents. See example below:
mixin HasCursorHandlerComponents on FlameGame implements MouseMovementDetector {
@override
@mustCallSuper
void onMouseMove(PointerHoverInfo info) {
propagateToChildren<CursorHandler>(
(CursorHandler child) => child.onMouseMove(info),
);
}
}
Interested in a PR, basic implementation already tested.
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