animate relative mouse movements as well
parent
a69abb5b2f
commit
96b1c19f0a
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue