I would like to be able to set the mouse to a specific position by code.
I tried the following code, but it doesn’t seem to do a thing:
var xx = s2d.width / 2;
var yy = s2d.height / 2;
sevents.setMousePos( xx, yy );
sevents
is derived from public var sevents(default,null) : hxd.SceneEvents;
in the App.hx class.
I also looked in hxd.Cursor, h2d.Scene and hxd.Window (maybe there use mouseLock
? not implemented however) for appropriate methods but couldn’t find any…
Any suggestions? Let me know.
Thank you.