Simplify the main loop, events only perform functional update
This commit is contained in:
@@ -26,17 +26,28 @@ fixedCoordPictures u =
|
||||
cfig = _uvConfig u
|
||||
|
||||
drawConcurrentMessage :: Universe -> Picture
|
||||
drawConcurrentMessage u = case u ^? uvSideEffects . _head of
|
||||
--Just (BlockingConcEffect str) -> fillWidthText cfig str
|
||||
Just (RunningSideEffect str) ->
|
||||
listPicturesAt
|
||||
(halfWidth cfig)
|
||||
(_windowY cfig - 50)
|
||||
cfig
|
||||
[centerText str]
|
||||
_ -> mempty
|
||||
drawConcurrentMessage u =
|
||||
stackPicturesAt
|
||||
(halfWidth cfig)
|
||||
(_windowY cfig - 50)
|
||||
cfig
|
||||
(map (centerText . f) $ u ^.. uvSideEffects . each)
|
||||
where
|
||||
cfig = _uvConfig u
|
||||
f (RunningSideEffect ce) = ce ++ " IN PROGRESS"
|
||||
f x = _ceString x ++ " QUEUED"
|
||||
|
||||
-- = case u ^? uvSideEffects . _head of
|
||||
-- --Just (BlockingConcEffect str) -> fillWidthText cfig str
|
||||
-- Just (RunningSideEffect str) ->
|
||||
-- stackPicturesAt
|
||||
-- (halfWidth cfig)
|
||||
-- (_windowY cfig - 50)
|
||||
-- cfig
|
||||
-- [centerText str]
|
||||
-- _ -> mempty
|
||||
-- where
|
||||
-- cfig = _uvConfig u
|
||||
|
||||
customMouseCursor :: Configuration -> World -> Picture
|
||||
customMouseCursor cfig w =
|
||||
|
||||
Reference in New Issue
Block a user