module Dodge.Menu.PushPop where
import Dodge.Data
import LensHelp

popScreen' :: Universe -> Maybe Universe
popScreen' = Just . (menuLayers %~ tail)
popScreen :: Universe -> IO (Maybe Universe)
popScreen = return . popScreen'


pushScreen' :: ScreenLayer -> Universe -> Maybe Universe
pushScreen' ml = Just . (menuLayers .:~ ml)
pushScreen :: ScreenLayer -> Universe -> IO (Maybe Universe)
pushScreen ml = return . pushScreen' ml
