| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Helm.Mouse
Contents
Description
Contains subscriptions to events from the mouse.
Types
data MouseButton Source
Represents a mouse button that can be pressed on a mouse.
Constructors
| LeftButton | |
| MiddleButton | |
| RightButton | |
| X1Button | |
| X2Button | |
| UnknownButton |
Subscriptions
Arguments
| :: Engine e | |
| => (V2 Int -> a) | The function to map a mouse position to an action. |
| -> Sub e a | The mapped subscription. |
Subscribe to mouse movement events and map to a game action.
Arguments
| :: Engine e | |
| => (MouseButton -> V2 Int -> a) | The function to map a mouse button and position to an action. |
| -> Sub e a | The mapped subscription. |
Subscribe to mouse click events and map to a game action. This subscription is for all mouse buttons - you'll need to match over a mouse button if you want to capture a specific one.
Note that Helm defines a mouse click as a mouse up event which came after a very recent mouse down event in a close radius of the mouse down event.
Arguments
| :: Engine e | |
| => (MouseButton -> V2 Int -> a) | The function to map a mouse button and position to an action. |
| -> Sub e a | The mapped subscription. |
Subscribe to mouse button down events and map to a game action.