on c19ccfe help sign in
elk/libraries/Mouse.elm
24 lines 542 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
15-- The current state of the left mouse-button.
16-- True when the button is down, and false otherwise.
17isDown : Signal Bool
19-- True immediately after the left mouse-button has been clicked,
20-- and false otherwise.
21isClicked : Signal Bool
23-- Always equal to unit. Event triggers on every mouse click.
24clicks : Signal ()