on 294fdfd help sign in
elk/libraries/Mouse.elm
26 lines 545 B history raw
2module Mouse where
4import Native.Mouse as M
6-- The current mouse position.
7position : Signal (Int,Int)
9-- The current x-coordinate of the mouse.
10x : Signal Int
12-- The current y-coordinate of the mouse.
13y : Signal Int
16-- The current state of the left mouse-button.
17-- True when the button is down, and false otherwise.
18isDown : Signal Bool
20-- True immediately after the left mouse-button has been clicked,
21-- and false otherwise.
22isClicked : Signal Bool
25-- Always equal to unit. Event triggers on every mouse click.
26clicks : Signal ()