Space zooms to position on carte

This commit is contained in:
2021-04-20 20:11:15 +02:00
parent 732e5281a8
commit 7c0fbe0ce2
2 changed files with 13 additions and 7 deletions
+10 -4
View File
@@ -71,10 +71,16 @@ debugKey scancode w
debugKey _ w = Just w
spaceAction :: World -> World
spaceAction w = case listToMaybe $ _closeActiveObjects w of
Just (Left flit) -> pickUpItem' flit w
Just (Right but) -> _btEvent but but w
Nothing -> w
spaceAction w = if _carteDisplay w
then
w & carteCenter .~ theLoc
else
case listToMaybe $ _closeActiveObjects w of
Just (Left flit) -> pickUpItem' flit w
Just (Right but) -> _btEvent but but w
Nothing -> w
where
theLoc = fst (_seenLocations w IM.! _selLocation w) w
pauseGame :: World -> World
pauseGame w = w {_menuLayers = [PauseMenu]}