Skip to content

Commit

Permalink
fixed mouse position when FlxG.game is not at (0, 0)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHaxe committed Mar 11, 2024
1 parent 8468021 commit 3d5772b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## dev branch / next version (1.x.x)

## version 1.1.1 (2024-03-11)

- fixed mouse positions when FlxG.game is not at (0, 0)

## version 1.1.0 (2024-03-09)

- added FlixelHaxeUIDriver for Flixel with or without HaxeUI
Expand Down
4 changes: 2 additions & 2 deletions haxelib.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"ui-test"
],
"description": "an automated ui-testing framework for Haxe",
"version": "1.1.0",
"releasenote": "added FlixelHaxeUIDriver - see CHANGELOG",
"version": "1.1.1",
"releasenote": "fixed mouse positions when FlxG.game is not at (0, 0) - see CHANGELOG",
"contributors": [
"AlexHaxe"
],
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@alexhaxe/haxeium",
"version": "1.1.0",
"version": "1.1.1",
"description": "an automated ui-testing framework for Haxe",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/haxeium/drivers/FlixelHaxeUIDriver.hx
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ class FlixelHaxeUIDriver extends DriverBase<FlxObjectComponent> {
try {
runInMainThread(function() {
var scale = FlxG.scaleMode.scale;
LimeDispatchHelper.dispatchMouseEvent(command, scale.x * x, scale.y * y);
LimeDispatchHelper.dispatchMouseEvent(command, FlxG.game.x + scale.x * x, FlxG.game.y + scale.y * y);
});
virtualX = x;
virtualY = y;
Expand Down

0 comments on commit 3d5772b

Please sign in to comment.