Count mouse button press time up from 0

This commit is contained in:
2023-04-27 11:39:42 +01:00
parent 9972e0fdea
commit 5b1212e4f6
6 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -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