animate relative mouse movements as well

This commit is contained in:
Sascha Nitsch 2024-09-09 18:43:06 +02:00
parent a69abb5b2f
commit 96b1c19f0a

View file

@ -177,7 +177,15 @@ function _mousemoveaction($main, $control, $options, $targetX, $targetY)
function mousemoverel($main, $control, $options)
{
$coord = explode(" ", $options['parameter']);
$control->mousemoveRel(intval($coord[0], 10), intval($coord[1], 10));
$x = intval($coord[0], 10);
$y = intval($coord[1], 10);
if (array_key_exists('jump', $options)) {
$control->mousemoveRel($x, $y);
} else {
$mouseX = $main->getMouseX();
$mouseY = $main->getMouseY();
_mousemoveaction($main, $control, $options, $mouseX + $x, $mouseY + $y);
}
return true;
}