Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by pawel

Hi,

input.mouse.x and input.mouse.y returns mouse position within a gameplay area,
however if I move mouse outside the gameplay area it still contains the last x, y values, which makes my scrolling on the edges difficult to use.

All I need to know if the mouse cursor is (for sure) over the gameplay area at the given moment.

I suppose I could use some sort of jquery hack, but maybe there is a better way to do it?

Thanks for any help.

1 decade ago by pawel

It looks like it will be difficult to do as the mousemove is assigned to canvas element, and hasn't go any knowledge about "outside world"

I think I will endup extending input.js and adding listener for the mouseout event
Page 1 of 1
« first « previous next › last »