If the device supports touch input, set default controls to TOUCH

This commit is contained in:
Francesco Balestrieri
2014-07-04 16:08:50 +03:00
committed by baleboy
parent e2f0a5f9eb
commit 992ba4d0d3
4 changed files with 82 additions and 58 deletions
+5 -1
View File
@@ -33,8 +33,12 @@ init = (controlType, quality, hud, godmode) ->
)
u = bkcore.Utils.getURLParameter
defaultControls = if bkcore.Utils.isTouchDevice() then 1 else 0
s = [
['controlType', ['KEYBOARD', 'TOUCH', 'LEAP MOTION CONTROLLER', 'GAMEPAD'], 0, 0, 'Controls: ']
['controlType', ['KEYBOARD', 'TOUCH', 'LEAP MOTION CONTROLLER',
'GAMEPAD'], defaultControls, defaultControls, 'Controls: ']
['quality', ['LOW', 'MID', 'HIGH', 'VERY HIGH'], 3, 3, 'Quality: ']
['hud', ['OFF', 'ON'], 1, 1, 'HUD: ']
['godmode', ['OFF', 'ON'], 0, 1, 'Godmode: ']