Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contains subscriptions to events from the mouse.
Types
data MouseButton Source
Represents a mouse button that can be pressed on a mouse.
Subscriptions
:: 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.
:: 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.
:: 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.