Only exclude touch events from non-view processing

Mouse events that go out of the StreamView area are okay
This commit is contained in:
Cameron Gutman
2022-09-17 13:36:44 -05:00
parent 6b79340c15
commit 313ef06c86

View File

@@ -1688,6 +1688,12 @@ public class Game extends Activity implements SurfaceHolder.Callback,
return false;
}
@Override
public boolean onGenericMotionEvent(MotionEvent event) {
return handleMotionEvent(null, event) || super.onGenericMotionEvent(event);
}
private void updateMousePosition(View view, MotionEvent event) {
// X and Y are already relative to the provided view object
float eventX = event.getX(0);