Helo, i have a prototyped function that I would like to use as a mouse movement handler, the code that i have right now looks like this
window.onmousemove=this.seeThings;
MainMenu=function(game)
{
this.game=game;
this.gb=new GuiButton(300,100,200,30,"haha",this.game);
}
MainMenu.prototype.draw=function()
{
this.game.context.fillStyle="red";
this.gb.draw();
}
MainMenu.prototype.seeThings(e)
{
mouseX=e.clientX;
mouseY=e.clientY;
console.log(mouseX+"and"+mouseY);
this.gb.seeHover(e);
}
this code errors as: Uncaught ReferenceError: e is not defined MainMenu.js:13
(anonymous function) MainMenu.js:13
and no mouse motion is detected. how could I possibly make this work?