Flatten HUDElement
This commit is contained in:
@@ -15,13 +15,13 @@ textInputFocus ::
|
||||
Applicative f =>
|
||||
World ->
|
||||
Maybe ((String -> f String) -> World -> f World)
|
||||
textInputFocus w = case w ^? hud . hudElement . subInventory of
|
||||
textInputFocus w = case w ^? hud . subInventory of
|
||||
Just NoSubInventory{} -> case he ^? diSelection . _Just . _1 of
|
||||
Just (-1) -> Just $ hud . hudElement . diInvFilter . _Just
|
||||
Just 2 -> Just $ hud . hudElement . diCloseFilter . _Just
|
||||
Just (-1) -> Just $ hud . diInvFilter . _Just
|
||||
Just 2 -> Just $ hud . diCloseFilter . _Just
|
||||
_ -> Nothing
|
||||
Just CombineInventory{} -> case he ^? subInventory . ciSelection . _Just . _1 of
|
||||
Just (-1) -> Just $ hud . hudElement . subInventory . ciFilter . _Just
|
||||
Just (-1) -> Just $ hud . subInventory . ciFilter . _Just
|
||||
_ -> Nothing
|
||||
Just DisplayTerminal{_termID = tmid} -> do
|
||||
-- connectionstatus <- w ^? cWorld . lWorld . terminals . ix tmid . tmStatus
|
||||
@@ -29,4 +29,4 @@ textInputFocus w = case w ^? hud . hudElement . subInventory of
|
||||
return $ cWorld . lWorld . terminals . ix tmid . tmStatus . tiText
|
||||
_ -> Nothing
|
||||
where
|
||||
he = w ^. hud . hudElement
|
||||
he = w ^. hud
|
||||
|
||||
Reference in New Issue
Block a user