Added d-pad functionality
This commit is contained in:
parent
33b3016b88
commit
87d001fa03
2 changed files with 8 additions and 5 deletions
|
@ -12,9 +12,6 @@
|
|||
(prefix sdl2-image "img:")
|
||||
(prefix sdl2-ttf "ttf:"))
|
||||
|
||||
(change-directory
|
||||
(irregex-match-substring (irregex-search '(: bos (* any) #\/) (executable-pathname))))
|
||||
|
||||
;;; Configuration Handling
|
||||
|
||||
(define tomldata (table-from-file "menu.toml"))
|
||||
|
@ -175,7 +172,9 @@
|
|||
active-button-id))))
|
||||
((controller-button-down) (begin
|
||||
(case (sdl2:controller-button-event-button ev)
|
||||
((a) (trigger-action! window)))
|
||||
((a) (trigger-action! window))
|
||||
((dpad-left) (change-active-button -1))
|
||||
((dpad-right) (change-active-button 1)))
|
||||
(set! debugtext (format "Controller button: ~A"
|
||||
(sdl2:controller-button-event-button ev)))))
|
||||
((key-down) (set! debugtext "Event: Key down"))
|
||||
|
|
6
menu.scm
6
menu.scm
|
@ -1,6 +1,10 @@
|
|||
(module (menu)
|
||||
()
|
||||
(import (scheme)
|
||||
(chicken base))
|
||||
(chicken base)
|
||||
(chicken irregex)
|
||||
(chicken process-context))
|
||||
(include-relative "./menu-impl.scm")
|
||||
(change-directory
|
||||
(irregex-match-substring (irregex-search '(: bos (* any) #\/) (executable-pathname))))
|
||||
(main))
|
||||
|
|
Loading…
Reference in a new issue