BKcore/HexGL — pull request #23 by baleboy (2014-07-04 16:02:19+00:00)
Title: If the device supports touch input, set default controls to TOUCH

This patch checks whether the device supports touch input, and if so sets the default control type to "touch". This way one doesn't need to select the input type every time when starting the game on a touch-enabled device. For non-touch devices, "Keyboard" continues to be the default.

A "isTouchDevice" function is added to bkcore.Utils and is used in launch.js to set the default.

Note: I changed bkcore/Utils.js directly rather than bkcore.coffee/Utils.coffee because the latter didn't seem to generate the same file as the former. I can update the coffeeScript file if needed.

Tested on a Nexus 5 and Chromium on Ubuntu.