free-game-1.0.3: Create games for free

Portabilitynon-portable
Stabilityprovisional
MaintainerFumiaki Kinoshita <fumiexcel@gmail.com>
Safe HaskellNone

FreeGame.UI

Description

Provides the free embodiment.

Documentation

reUI :: FreeGame f => UI a -> f aSource

class (Picture2D m, Local m, Keyboard m, Mouse m, FromFinalizer m) => FreeGame m whereSource

Methods

draw :: forall f. (Applicative f, Monad f, Picture2D f, Local f) => f a => m aSource

Draw an action that consist of Picture2D's methods.

preloadBitmap :: Bitmap -> m ()Source

Load a Bitmap to avoid the cost of the first invocation of bitmap.

bracket :: Frame a -> m aSource

Run a Frame, and release all the matter happened.

forkFrame :: Frame () -> m ()Source

Run a Frame action concurrently. Please do not use this function to draw pictures.

takeScreenshot :: m BitmapSource

Generate a Bitmap from the front buffer.

setFPS :: Int -> m ()Source

setTitle :: String -> m ()Source

showCursor :: m ()Source

hideCursor :: m ()Source

clearColor :: Color -> m ()Source

getFPS :: m IntSource

Instances

FreeGame UI 
(FreeGame m, Monad m) => FreeGame (IdentityT m) 
(FreeGame m, Functor m) => FreeGame (F m) 
(FreeGame m, Functor m) => FreeGame (Free m) 
(FreeGame m, Monad m) => FreeGame (IterT m) 
(FreeGame m, Monad m) => FreeGame (ListT m) 
(FreeGame m, Monad m) => FreeGame (MaybeT m) 
(FreeGame m, Monad m, Error e) => FreeGame (ErrorT e m) 
(FreeGame m, Monad m) => FreeGame (ContT r m) 
(FreeGame m, Monad m) => FreeGame (StateT s m) 
(FreeGame m, Monad m) => FreeGame (StateT s m) 
(FreeGame m, Monad m, Monoid w) => FreeGame (WriterT w m) 
(FreeGame m, Monad m, Monoid w) => FreeGame (WriterT w m) 
(FreeGame m, Monad m, Monoid w) => FreeGame (RWST r w s m) 
(FreeGame m, Monad m, Monoid w) => FreeGame (RWST r w s m)