Count mouse button press time up from 0
This commit is contained in:
@@ -64,7 +64,7 @@ handleMouseButtonEvent :: MouseButtonEventData -> Input -> Input
|
||||
handleMouseButtonEvent mbev theinput = case mouseButtonEventMotion mbev of
|
||||
Released -> theinput & mouseButtons . at thebutton .~ Nothing
|
||||
Pressed -> theinput
|
||||
& mouseButtons . at thebutton ?~ 1
|
||||
& mouseButtons . at thebutton ?~ 0
|
||||
& clickPos . at thebutton ?~ (theinput ^. mousePos)
|
||||
-- note that mouse button down events are NOT repeating
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user