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

added mouse buttons to input.js #33

Closed err0 closed 12 years ago

err0 commented 12 years ago

mouse0, mouse1, mouse2 are valid human_names for jaws.pressed. (tested)

I expect jaws.on_keydown & on_keyup will work as well. (needs testing)

ippa commented 12 years ago

Nice work, but it would be better if this pull request doesn't include 30 other commits. Also not totally sure about mouse1, mouse2, mouse3 .. how about left_mouse_button, middle_mouse_button and right_mouse_button .. (I assume that is what mouse1, mouse2 and mouse3 is). I'm ok with double names, one short and one long. But they should be looked up in a simular way as the keys are.

err0 commented 12 years ago

I am not sure why there are 30 commits. I pulled those in to my master from the fork queue pretty much entirely from your master. I will close the pull request and re-try with just the commit on input.js

I wasn't sure it was worth making a map similar to the keys for the 3 buttons. Could be done though, it would make things more transparent.