Remove intmap over filters
This commit is contained in:
@@ -68,11 +68,11 @@ inputFocus ::
|
||||
Maybe ((String -> f String) -> World -> f World)
|
||||
inputFocus w = case w ^? hud . hudElement . subInventory of
|
||||
Just NoSubInventory{} -> case he ^? diSelection . _Just of
|
||||
Just (-1, _) -> di (-1)
|
||||
Just (2, _) -> di 2
|
||||
Just (-1, _) -> Just $ hud . hudElement . diInvFilter . _Just
|
||||
Just (2, _) -> Just $ hud . hudElement . diCloseFilter . _Just
|
||||
_ -> Nothing
|
||||
Just CombineInventory{} -> case he ^? subInventory . ciSelection . _Just of
|
||||
Just (-1, _) -> Just $ hud . hudElement . subInventory . ciFilters . ix (-1) . _Just
|
||||
Just (-1, _) -> Just $ hud . hudElement . subInventory . ciFilter . _Just
|
||||
_ -> Nothing
|
||||
Just DisplayTerminal{_termID = tmid} -> do
|
||||
hasfocus <- w ^? cWorld . lWorld . terminals . ix tmid . tmInput . tiFocus
|
||||
@@ -81,7 +81,6 @@ inputFocus w = case w ^? hud . hudElement . subInventory of
|
||||
return $ cWorld . lWorld . terminals . ix tmid . tmInput . tiText
|
||||
_ -> Nothing
|
||||
where
|
||||
di x = Just $ hud . hudElement . diFilters . ix x . _Just
|
||||
he = w ^. hud . hudElement
|
||||
|
||||
inTopRegex :: Int -> World -> Bool
|
||||
|
||||
Reference in New Issue
Block a user