Commit a1bf22b6 authored by josmas's avatar josmas

Fixes to TouchUp to return the current x and y values instead of the previous values

Change-Id: Idbf57b2bc5ad04bc352d149714469eb352776f92
parent 2c0a3de3
......@@ -286,26 +286,26 @@ public final class Canvas extends AndroidViewComponent implements ComponentConta
handled = false;
for (Sprite sprite : draggedSprites) {
if (sprite.Enabled() && sprite.Visible()) {
sprite.Touched(startX, startY);
sprite.TouchUp(startX, startY);
sprite.Touched(x, y);
sprite.TouchUp(x, y);
handled = true;
}
}
// Last argument indicates that one or more sprites handled the tap
Touched(startX, startY, handled);
Touched(x, y, handled);
}
else {
for (Sprite sprite : draggedSprites) {
if (sprite.Enabled() && sprite.Visible()) {
sprite.Touched(startX, startY);
sprite.TouchUp(startX, startY);
sprite.Touched(x, y);
sprite.TouchUp(x, y);
}
}
}
// This is intentionally outside the if (!drag) block.
// Even the release of a drag on the canvas should fire
// a touch-up event.
TouchUp(startX, startY);
TouchUp(x, y);
// Prepare for next drag
drag = false;
......
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