Continue mouse refactor, add explicit release event/timer
This commit is contained in:
@@ -63,8 +63,10 @@ handleMouseWheelEvent mwev = scrollAmount +~ fromIntegral y
|
||||
handleMouseButtonEvent :: MouseButtonEventData -> Input -> Input
|
||||
handleMouseButtonEvent mbev theinput = case mouseButtonEventMotion mbev of
|
||||
Released -> theinput & mouseButtons . at thebutton .~ Nothing
|
||||
& mouseButtonsReleased . at thebutton ?~ 0
|
||||
Pressed -> theinput
|
||||
& mouseButtons . at thebutton ?~ 0
|
||||
& mouseButtonsReleased . at thebutton .~ Nothing
|
||||
& clickPos . at thebutton ?~ (theinput ^. mousePos)
|
||||
-- note that mouse button down events are NOT repeating
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user