elm/libraries/Mouse.elm
2013-03-13 00:03:54 -07:00

26 lines
545 B
Elm

module Mouse where
import Native.Mouse as M
-- The current mouse position.
position : Signal (Int,Int)
-- The current x-coordinate of the mouse.
x : Signal Int
-- The current y-coordinate of the mouse.
y : Signal Int
-- The current state of the left mouse-button.
-- True when the button is down, and false otherwise.
isDown : Signal Bool
-- True immediately after the left mouse-button has been clicked,
-- and false otherwise.
isClicked : Signal Bool
-- Always equal to unit. Event triggers on every mouse click.
clicks : Signal ()