SimpleWindow first pass at gamepad support

This commit is contained in:
2023-07-06 09:47:46 -06:00
parent bd56790167
commit 5a3644d26e
3 changed files with 37 additions and 2 deletions

View File

@@ -14,10 +14,21 @@
("Vertical"
null)
("Menu"
null)
(subMenu))
("Quit"
(Sys.exit 0))
(never otherwise))))
(method subMenu []
(.enableGamepadInput
(SimpleWindow.promptForChoice "SubMenu" ["A" "B" "C" "{tab} Back"]
->:Void choice
(case choice
("{tab} Back" (showMenu))
(never otherwise)))
true
null
[=>B "tab"]))
(method &override :Void update [:Float elapsed]
(super.update elapsed))