introduce canvas size

This commit is contained in:
nek0 2017-03-23 04:31:10 +01:00
parent 369a74c0d0
commit 0d48565c85
6 changed files with 7 additions and 0 deletions

View File

@ -34,6 +34,7 @@ main = do
, drawLoop = draw
, loadState = load
, cleanUp = clean
, canvasSize = Nothing
}
withAffection conf

View File

@ -20,6 +20,7 @@ main = do
, drawLoop = draw
, loadState = load
, cleanUp = clean
, canvasSize = Nothing
}
withAffection conf

View File

@ -21,6 +21,7 @@ main = do
, drawLoop = draw
, loadState = load
, cleanUp = clean
, canvasSize = Nothing
}
withAffection conf

View File

@ -28,6 +28,7 @@ main = do
, drawLoop = draw
, loadState = load
, cleanUp = clean
, canvasSize = Nothing
}
withAffection conf

View File

@ -18,6 +18,7 @@ main = do
{ initComponents = All
, windowTitle = "Affection: example00"
, windowConfig = SDL.defaultWindow
, canvasSize = Just (3289, 600)
, preLoop = return ()
, eventLoop = handle
, updateLoop = update

View File

@ -55,6 +55,8 @@ data AffectionConfig us = AffectionConfig
-- ^ Window title
, windowConfig :: SDL.WindowConfig
-- ^ Window configuration
, canvasSize :: Maybe (Int, Int)
-- ^ size of the texture canvas
, preLoop :: Affection us ()
-- ^ Actions to be performed, before loop starts
, eventLoop :: SDL.EventPayload -> Affection us ()