Skip to content

Commit

Permalink
Replace deprecated screenX/Y in MouseUtil
Browse files Browse the repository at this point in the history
  • Loading branch information
NotHyper-474 committed Oct 30, 2024
1 parent 0d8e4a5 commit c4ca095
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/funkin/util/MouseUtil.hx
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ class MouseUtil
if (jusPres)
{
oldCamPos.set(target.x, target.y);
oldMousePos.set(FlxG.mouse.screenX, FlxG.mouse.screenY);
oldMousePos.set(FlxG.mouse.viewX, FlxG.mouse.viewY);
}

if (pressed)
{
target.x = oldCamPos.x - (FlxG.mouse.screenX - oldMousePos.x);
target.y = oldCamPos.y - (FlxG.mouse.screenY - oldMousePos.y);
target.x = oldCamPos.x - (FlxG.mouse.viewX - oldMousePos.x);
target.y = oldCamPos.y - (FlxG.mouse.viewY - oldMousePos.y);
}
}

Expand Down

0 comments on commit c4ca095

Please sign in to comment.