| Maintainer | Fumiaki Kinoshita <fumiexcel@gmail.com> |
|---|---|
| Safe Haskell | None |
Graphics.UI.FreeGame
Description
free-game is a library that abstracts and purifies GUI applications with simple interfaces.
- type Game = F GUI
- runGame :: GUIParam -> Game a -> IO (Maybe a)
- def :: Default a => a
- module Graphics.UI.FreeGame.Base
- module Graphics.UI.FreeGame.Data.Bitmap
- module Graphics.UI.FreeGame.Data.Font
- module Graphics.UI.FreeGame.GUI
- module Graphics.UI.FreeGame.Util
- module Graphics.UI.FreeGame.Text
- module Graphics.UI.FreeGame.Types
- module Control.Monad
- module Control.Applicative
- module Data.Color
- module Data.Color.Names
- module Linear
Examples
import Control.Monad import Graphics.UI.FreeGame main = runGame def $ forever tick
shows a window and does nothing.
for more examples, see https://github.com/fumieval/free-game/tree/master/examples.
Game is a free monad which describes GUIs.
This monad is an instance of Picture2D so you can create it using fromBitmap and can be transformed with translate, scale, rotate, colored.
It is also an instance of Keyboard and Mouse.
You have to call tick at the end of the current frame.
The only way to embody Game as real thing is to apply runGame.
Reexports
module Graphics.UI.FreeGame.Base
module Graphics.UI.FreeGame.GUI
module Graphics.UI.FreeGame.Util
module Graphics.UI.FreeGame.Text
module Graphics.UI.FreeGame.Types
module Control.Monad
module Control.Applicative
module Data.Color
module Data.Color.Names
module Linear