Skip to content

Commit

Permalink
Fix event touch offset (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
inc0der authored Sep 30, 2020
1 parent 6257df4 commit 662bde3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scenes/Scene_Map.hx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Scene_Map extends RmScene_Map {
*/
var mx = untyped TouchInput.mouseX;
var my = untyped TouchInput.mouseY;
var rect = { x: event.screenX() - 24, width: 48, height: 48, y: event.screenY() - 24 };
var rect = { x: event.screenX() - 24, width: 48, height: 48, y: event.screenY() - 48 };
return mx > rect.x && mx < rect.x + rect.width && my > rect.y && my < rect.y + rect.height;
}

Expand Down

0 comments on commit 662bde3

Please sign in to comment.