(if (equal? (get-event-type event) 'key-input-event)
(set! key-is-down
(assoc-set! key-is-down
- (get-event-key-input-key event)
- (get-event-key-input-pressed event))))
+ (get-event-key event)
+ (get-event-key-pressed event))))
#f)
(define receiver (make-event-receiver on-event))
(define-class <event> (<irrlicht-base>)
(irr-class #:init-value "SEvent"))
+(define-method (get-event-key (event <event>))
+ (let ((SEvent_SKeyInput_Key (get-irrlicht-proc "SKeyInput_Key" event)))
+ (SEvent_SKeyInput_Key event)))
+
+(define-method (get-event-key-pressed (event <event>))
+ (let ((SEvent_SKeyInput_PressedDown (get-irrlicht-proc "SKeyInput_PressedDown" event)))
+ (SEvent_SKeyInput_PressedDown event)))
+
(define-method (get-event-type (event <event>))
(let ((SEvent_EventType (get-irrlicht-proc "EventType" event)))
(SEvent_EventType event)))
-(export <event> get-event-type)
+(export <event> get-event-key get-event-key-pressed get-event-type)
;; IEventReceiver