handlerPointerSignal method
Implementation
@override
bool handlerPointerSignal(PointerSignalEvent event) {
if (!enableMouseGesture) {
return super.handlerPointerSignal(event);
}
int pointer = event.pointer;
Vector2 position = event.localPosition.toVector2();
Vector2 realPosition = event.localPosition.toVector2();
if (!isHud) {
realPosition = gameRef.screenToWorld(realPosition);
}
Vector2 scrollDelta = (event as PointerScrollEvent).scrollDelta.toVector2();
onMouseScrollScreen(pointer, position, scrollDelta);
if (containsPoint(realPosition)) {
onMouseScroll(pointer, position, scrollDelta);
}
return super.handlerPointerSignal(event);
}