ippa / jaws

Jaws - HTML5 canvas javascript 2D Game Framework
https://jawsjs.ippa.se
GNU Lesser General Public License v3.0
363 stars 75 forks source link

No functions for mouse bindings(?) #30

Closed Paaskehare closed 12 years ago

Paaskehare commented 12 years ago

Hi, I really liked the examples and the simple documentation provided for this js game library, but I couldn't seem to find any subject regarding mouse bindings. In the game I intend to make I want to make it react on mouse events, both when clicking and moving the mouse. How would I go about doing this?

Thanks in advance.

ippa commented 12 years ago

Right now, just make your own bindings to detect clicks with window.addEventListener("eventname", function)

The only thing jaws currently provides is jaws.mouse_x and jaws.mouse_y which is the mouse pointers position inside the canvas (and not the browser window).

ippa commented 12 years ago

that's:

jaws.mouse_x
jaws.mouse_y
Paaskehare commented 12 years ago

Very cool, I couldn't find those in the documentation though, but thank you very much :-)

ippa commented 12 years ago

good find, documented them @ http://jawsjs.com/docs/symbols/jaws.html