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 , drawLoop = draw
, loadState = load , loadState = load
, cleanUp = clean , cleanUp = clean
, canvasSize = Nothing
} }
withAffection conf withAffection conf

View file

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

View file

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

View file

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

View file

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

View file

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