Safe Haskell | None |
---|---|
Language | Haskell2010 |
- playSodium :: Display -> Color -> Int -> (Event Float -> Event InputEvent -> Reactive (Behavior Picture)) -> IO ()
- type InputEvent = Event
Documentation
:: Display | The display method |
-> Color | The background colour |
-> Int | The refresh rate, in Hertz |
-> (Event Float -> Event InputEvent -> Reactive (Behavior Picture)) | A Reactive action to generate the Picture Behavior, taking the refresh and input Events with respect to which to build it. The refresh event generates a Float indicating the time delta since the last refresh. |
-> IO () |
Play the game in a window, updating when the value of the provided Behavior Picture changes.
type InputEvent = Event Source
A useful type synonym for Gloss event values, to avoid confusion between Gloss and Sodium.