Load window size from config into world

This commit is contained in:
jgk
2021-03-22 23:06:19 +01:00
parent e296e5d841
commit 257e60e4e8
3 changed files with 15 additions and 21 deletions
+3 -2
View File
@@ -31,13 +31,14 @@ setupLoop :: String
-> Int
-> IO (PreloadData a)
-> (PreloadData a -> IO ())
-> world
-> IO world
-> (PreloadData a -> world -> IO (PreloadData a))
-> (world -> Event -> Maybe world)
-> (world -> Maybe world)
-> IO ()
setupLoop wName xSize ySize
customInit initCleanup startWorld sideEffects eventFn worldFn = do
customInit initCleanup ioStartWorld sideEffects eventFn worldFn = do
startWorld <- ioStartWorld
initializeAll
bracket (createWindow (T.pack wName) (winConfig xSize ySize)) destroyWindow
(\window ->