Fix pause menu

This commit is contained in:
2021-11-28 14:32:03 +00:00
parent 462100703c
commit 1c5abfd6f2
2 changed files with 3 additions and 7 deletions
+3 -3
View File
@@ -43,7 +43,7 @@ handlePressedKey _ scode w
handlePressedKeyInGame :: Scancode -> World -> Maybe World
handlePressedKeyInGame scode w
| scode == escapeKey (_keyConfig w) = Nothing
-- | scode == pauseKey (_keyConfig w) = Just $ pauseGame $ escapeMap w
| scode == pauseKey (_keyConfig w) = Just $ pauseGame $ escapeMap w
| scode == dropItemKey (_keyConfig w) = Just $ youDropItem w
| scode == toggleMapKey (_keyConfig w) = Just $ toggleMap w
| scode == reloadKey (_keyConfig w) = Just $ fromMaybe w $ startReloadingWeapon (you w) w
@@ -77,8 +77,8 @@ spaceAction w = if _carteDisplay w
theLoc = fst (_seenLocations w IM.! _selLocation w) w
updateTopCloseObject i w' = w' & closeObjects %~ ( Right (_buttons w' IM.! i) : ) . tail
pauseGame :: Universe -> Universe
pauseGame w = w {_menuLayers = [pauseMenu]}
pauseGame :: World -> World
pauseGame w = w & sideEffects %~ (. (menuLayers .~ [pauseMenu]))
toggleMap :: World -> World
toggleMap w = w & carteDisplay %~ not
-4
View File
@@ -183,10 +183,6 @@ updateFramebufferSize w = w & sideEffects %~ sideEffectUpdatePreload divRes x y
where
(x,y) = (round $ getWindowX w, round $ getWindowY w)
divRes = w ^. config . resolution_factor
-- up :: (Universe -> IO Universe) -> Universe -> IO Universe
-- up f w' = do
-- pdata <- pdataResizeUpdate (x `div` divRes) (y `div` divRes) x y (_preloadData w')
-- f $ w' & uvWorld . preloadData .~ pdata
--levelMenu :: Int -> ScreenLayer
--levelMenu x = OptionScreen