|
|
|
@ -31,6 +31,15 @@ selectOption = (event, button) ->
|
|
|
|
|
return |
|
|
|
|
$(".options li.active").click() |
|
|
|
|
|
|
|
|
|
# enter the options room |
|
|
|
|
enterOptions = (event, button) -> |
|
|
|
|
if button != "back" and button != "start" |
|
|
|
|
return |
|
|
|
|
if button == "start" |
|
|
|
|
return salet.goTo(salet.optionsRoom) |
|
|
|
|
if button == "back" and salet.currentRoom == salet.optionsRoom |
|
|
|
|
return salet.goBack() |
|
|
|
|
|
|
|
|
|
# Joystick check, fires events |
|
|
|
|
joystick = () -> |
|
|
|
|
if typeof navigator.getGamepads == "function" |
|
|
|
@ -59,3 +68,4 @@ window.selectedoption ?= 1
|
|
|
|
|
$(document).on("press", selectUp) |
|
|
|
|
$(document).on("press", selectDown) |
|
|
|
|
$(document).on("press", selectOption) |
|
|
|
|
$(document).on("press", enterOptions) |
|
|
|
|