The current mouse detection function is very poor and tracks the mouse on mouse move, as demonstrated in the 'menu' code there are much better ways to do this.
The old "onmousemove" function to keep a ticker of the current mouse x and y positions has been replaced with calls to poll the x and y positions on mouse click and on mouse release.
The current mouse detection function is very poor and tracks the mouse on mouse move, as demonstrated in the 'menu' code there are much better ways to do this.