Allow for real time window resize
This commit is contained in:
+10
-2
@@ -22,12 +22,20 @@ import qualified Data.Set as S
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import qualified Data.Map as M
|
||||
import Control.Lens
|
||||
|
||||
update = update' . pushSideEffects
|
||||
|
||||
pushSideEffects :: World -> World
|
||||
pushSideEffects w = w
|
||||
& sideEffects .~ []
|
||||
& doneSideEffects .~ _sideEffects w
|
||||
|
||||
{- | The update step.
|
||||
If '_menuLayers' is not empty, or the saving screen, this is the identity.
|
||||
In such menus, the only way to change the world is using event handling.
|
||||
-}
|
||||
update :: World -> World
|
||||
update w = case _menuLayers w of
|
||||
update' :: World -> World
|
||||
update' w = case _menuLayers w of
|
||||
(ConfigSaveScreen : ls) -> w & menuLayers .~ ls
|
||||
(_ : _) -> w
|
||||
[] -> let w1 = updateParticles' . updateProjectiles
|
||||
|
||||
Reference in New Issue
Block a user