{-# OPTIONS_HADDOCK hide #-}
module Graphics.UI.Fungen.Text (
BitmapFont(..),
Text,
putGameText
) where
import Graphics.UI.GLUT
import Graphics.UI.Fungen.Types
type Text = (String,BitmapFont,Point2D,GLclampf,GLclampf,GLclampf)
putGameText :: [Text] -> IO ()
putGameText :: [Text] -> IO ()
putGameText [] = forall (m :: * -> *) a. Monad m => a -> m a
return ()
putGameText ((String
text,BitmapFont
font,(GLdouble
x,GLdouble
y),GLclampf
r,GLclampf
g,GLclampf
b):[Text]
ts) = do
IO ()
loadIdentity
forall a. Color a => a -> IO ()
color (forall a. a -> a -> a -> Color3 a
Color3 GLclampf
r GLclampf
g GLclampf
b)
forall a. RasterPos a => a -> IO ()
rasterPos (forall a. a -> a -> Vertex2 a
Vertex2 GLdouble
x GLdouble
y)
forall a (m :: * -> *). (Font a, MonadIO m) => a -> String -> m ()
renderString BitmapFont
font String
text
[Text] -> IO ()
putGameText [Text]
ts