diff --git a/src/Load.hs b/src/Load.hs index d4a574e..59f0406 100644 --- a/src/Load.hs +++ b/src/Load.hs @@ -25,7 +25,7 @@ loadLoad = do ud <- getAffection progress <- liftIO $ newMVar 0 future <- liftIO $ newEmptyMVar - _ <- liftIO $ forkIO $ loadFork (worldState ud) (nano ud) future progress + _ <- liftIO $ loadFork (worldState ud) (nano ud) future progress putAffection ud { stateMVar = future , stateProgress = progress diff --git a/src/Util.hs b/src/Util.hs index 6a7c911..35b2848 100644 --- a/src/Util.hs +++ b/src/Util.hs @@ -176,10 +176,11 @@ naviGraph imgmat (V2 r c) = drawLoadScreen :: UserData -> Float -> IO () drawLoadScreen ud progress = do let ctx = nano ud - -- fontSize ctx 100 - -- fontFace ctx (assetFonts ud Map.! FontBedstead) - -- textAlign ctx (S.fromList [AlignCenter, AlignTop]) fillColor ctx (rgb 255 128 0) + fontSize ctx 100 + fontFace ctx (assetFonts ud Map.! FontBedstead) + textAlign ctx (S.fromList [AlignCenter, AlignTop]) + textBox ctx 0 300 1280 "Loading" rect ctx (640 - 640 * realToFrac progress) 450 (1280 * realToFrac progress) 20 fill ctx