Module

FRP.Event.Mouse

Package
purescript-hyrule
Repository
mikesol/purescript-hyrule

#Mouse Source

newtype Mouse

A handle for creating events from the mouse position and buttons.

#getMouse Source

getMouse :: Effect Mouse

Get a handle for working with the mouse.

#down Source

down :: Effect { event :: Event Int, unsubscribe :: Effect Unit }

Create an Event which fires when a mouse button is pressed

#up Source

up :: Effect { event :: Event Int, unsubscribe :: Effect Unit }

Create an Event which fires when a mouse button is released

#withPosition Source

withPosition :: forall a. Mouse -> Event a -> Event { pos :: Maybe { x :: Int, y :: Int }, value :: a }

Create an event which also returns the current mouse position.

#withButtons Source

withButtons :: forall a. Mouse -> Event a -> Event { buttons :: Set Int, value :: a }

Create an event which also returns the current mouse buttons.