|
|
|
|
|
|
|
|
this.__mouseLastButton = -1; |
|
|
this.__mouseLastButton = -1; |
|
|
this.__mouseLastAction = ""; |
|
|
this.__mouseLastAction = ""; |
|
|
this.__mouseButtons = []; |
|
|
this.__mouseButtons = []; |
|
|
|
|
|
this.__mouseInBounds = false; |
|
|
|
|
|
|
|
|
this.__keyboardEnabled = false; |
|
|
this.__keyboardEnabled = false; |
|
|
this.__mouseEnabled = false; |
|
|
this.__mouseEnabled = false; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
pos.x = Math.floor(pos.x); |
|
|
pos.x = Math.floor(pos.x); |
|
|
pos.y = Math.floor(pos.y); |
|
|
pos.y = Math.floor(pos.y); |
|
|
|
|
|
this.__mouseInBounds = pos.inbounds; |
|
|
return pos; |
|
|
return pos; |
|
|
}).bind(this); |
|
|
}).bind(this); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
isMouseInBounds(){return this.__mouseInBounds;} |
|
|
|
|
|
lastMousePosition(){ |
|
|
|
|
|
return [this.__mousePosition.x, this.__mousePosition.y]; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
listen(ename, func, owner=null, once=false){ |
|
|
listen(ename, func, owner=null, once=false){ |
|
|
if (([ |
|
|
if (([ |
|
|
"keyup", |
|
|
"keyup", |