animate relative mouse movements as well

develop
Sascha Nitsch 2024-09-09 18:43:06 +02:00
parent a69abb5b2f
commit 96b1c19f0a
1 changed files with 9 additions and 1 deletions

View File

@ -177,7 +177,15 @@ function _mousemoveaction($main, $control, $options, $targetX, $targetY)
function mousemoverel($main, $control, $options) function mousemoverel($main, $control, $options)
{ {
$coord = explode(" ", $options['parameter']); $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; return true;
} }