Commit c912ee23 authored by Viktor Lidholt's avatar Viktor Lidholt

Fixes touch handling in SpriteBox

parent 2032d3e4
...@@ -14,6 +14,7 @@ import 'package:box2d/box2d.dart' as box2d; ...@@ -14,6 +14,7 @@ import 'package:box2d/box2d.dart' as box2d;
import 'package:mojo/core.dart'; import 'package:mojo/core.dart';
import 'package:sky_services/media/media.mojom.dart'; import 'package:sky_services/media/media.mojom.dart';
import 'package:flutter/animation.dart'; import 'package:flutter/animation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/painting.dart'; import 'package:flutter/painting.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
......
...@@ -185,11 +185,11 @@ class SpriteBox extends RenderBox { ...@@ -185,11 +185,11 @@ class SpriteBox extends RenderBox {
} }
} }
void handleEvent(ui.Event event, _SpriteBoxHitTestEntry entry) { void handleEvent(InputEvent event, _SpriteBoxHitTestEntry entry) {
if (!attached) if (!attached)
return; return;
if (event is ui.PointerEvent) { if (event is PointerInputEvent) {
if (event.type == 'pointerdown') { if (event.type == 'pointerdown') {
// Build list of event targets // Build list of event targets
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment