elm/libraries/Mouse.elm

25 lines
542 B
Elm
Raw Normal View History

2013-02-21 22:43:32 +00:00
module Mouse where
2013-03-13 07:03:54 +00:00
import Native.Mouse as M
2013-02-21 22:43:32 +00:00
-- 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 ()