Safe Haskell | None |
---|---|
Language | Haskell98 |
This game mode lets you manage your own input. Pressing ESC will not abort the program.
You also don't get automatic pan and zoom controls like with display
.
- module Graphics.Gloss.Data.Display
- module Graphics.Gloss.Data.Picture
- module Graphics.Gloss.Data.Color
- playIO :: forall world. Display -> Color -> Int -> world -> (world -> IO Picture) -> (Event -> world -> IO world) -> (Float -> world -> IO world) -> IO ()
- data Event
- data Key
- data SpecialKey
- = KeyUnknown
- | KeySpace
- | KeyEsc
- | KeyF1
- | KeyF2
- | KeyF3
- | KeyF4
- | KeyF5
- | KeyF6
- | KeyF7
- | KeyF8
- | KeyF9
- | KeyF10
- | KeyF11
- | KeyF12
- | KeyF13
- | KeyF14
- | KeyF15
- | KeyF16
- | KeyF17
- | KeyF18
- | KeyF19
- | KeyF20
- | KeyF21
- | KeyF22
- | KeyF23
- | KeyF24
- | KeyF25
- | KeyUp
- | KeyDown
- | KeyLeft
- | KeyRight
- | KeyTab
- | KeyEnter
- | KeyBackspace
- | KeyInsert
- | KeyNumLock
- | KeyBegin
- | KeyDelete
- | KeyPageUp
- | KeyPageDown
- | KeyHome
- | KeyEnd
- | KeyShiftL
- | KeyShiftR
- | KeyCtrlL
- | KeyCtrlR
- | KeyAltL
- | KeyAltR
- | KeyPad0
- | KeyPad1
- | KeyPad2
- | KeyPad3
- | KeyPad4
- | KeyPad5
- | KeyPad6
- | KeyPad7
- | KeyPad8
- | KeyPad9
- | KeyPadDivide
- | KeyPadMultiply
- | KeyPadSubtract
- | KeyPadAdd
- | KeyPadDecimal
- | KeyPadEqual
- | KeyPadEnter
- data MouseButton
- data KeyState
- data Modifiers = Modifiers {}
Documentation
module Graphics.Gloss.Data.Display
module Graphics.Gloss.Data.Picture
module Graphics.Gloss.Data.Color
:: Display | Display mode. |
-> Color | Background color. |
-> Int | Number of simulation steps to take for each second of real time. |
-> world | The initial world. |
-> (world -> IO Picture) | An action to convert the world a picture. |
-> (Event -> world -> IO world) | A function to handle input events. |
-> (Float -> world -> IO world) | A function to step the world one iteration. It is passed the period of time (in seconds) needing to be advanced. |
-> IO () |
Play a game in a window, using IO actions to build the pictures.
Possible input events.
data SpecialKey Source #
data MouseButton Source #