Fix pause menu
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user