Skip to content
Browse files

add more event translators.

  • Loading branch information...
Shinmera committed Aug 13, 2019
1 parent d17d6b6 commit 5d3a1100e68b21ae5f0ed283bb25f13df2d4a7a9
Showing with 21 additions and 0 deletions.
  1. +21 −0 alloy/ui.lisp
@@ -42,3 +42,24 @@
(define-event-translator trial:mouse-scroll alloy:scroll
:delta (trial:delta ev)
:location (vec->point (trial:pos ev)))

(define-event-translator trial:text-entered alloy:text-event
:text (trial:text ev))

(define-event-translator trial:key-press alloy:key-down
:key (trial:key ev)
:code 0)

(define-event-translator trial:key-release alloy:key-up
:key (trial:key ev)
:code 0)

(define-event-translator trial:gamepad-press alloy:button-down
:device (trial:device ev)
:button (trial:button ev))

(define-event-translator trial:gamepad-release alloy:button-up
:device (trial:device ev)
:button (trial:button ev))

;; paste-event?

0 comments on commit 5d3a110

Please sign in to comment.
You can’t perform that action at this time.