adding mouseButtonEventMotion

This commit is contained in:
nek0 2018-02-18 04:30:53 +01:00
parent 8f662cf6fa
commit 39eaf0eb91
2 changed files with 3 additions and 1 deletions

View file

@ -21,6 +21,7 @@ data MouseMessage
| MsgMouseButton
{ msgMBWhen :: Double
, msgMBWindow :: Maybe SDL.Window
, msgMBMotion :: SDL.InputMotion
, msgMBWhich :: SDL.MouseDevice
, msgMBButton :: SDL.MouseButton
, msgMBClicks :: Word8
@ -37,5 +38,5 @@ data MouseMessage
instance Message MouseMessage where
msgTime (MsgMouseMotion t _ _ _ _ _) = t
msgTime (MsgMouseButton t _ _ _ _ _) = t
msgTime (MsgMouseButton t _ _ _ _ _ _) = t
msgTime (MsgMouseWheel t _ _ _ _) = t

View file

@ -46,6 +46,7 @@ consumeSDLMouseEvents am = doConsume
partEmit am (MsgMouseButton
ts
(SDL.mouseButtonEventWindow dat)
(SDL.mouseButtonEventMotion dat)
(SDL.mouseButtonEventWhich dat)
(SDL.mouseButtonEventButton dat)
(SDL.mouseButtonEventClicks dat)