Refactor triplet to Selection datatype

This commit is contained in:
2025-08-26 18:13:27 +01:00
parent 9034c409e1
commit b87c3380b8
16 changed files with 127 additions and 135 deletions
+2 -2
View File
@@ -16,11 +16,11 @@ textInputFocus ::
World ->
Maybe ((String -> f String) -> World -> f World)
textInputFocus w = case w ^? hud . subInventory of
Just NoSubInventory{} -> case he ^? diSelection . _Just . _1 of
Just NoSubInventory{} -> case he ^? diSelection . _Just . slSec of
Just (-1) -> Just $ hud . diInvFilter . _Just
Just 2 -> Just $ hud . diCloseFilter . _Just
_ -> Nothing
Just CombineInventory{} -> case he ^? subInventory . ciSelection . _Just . _1 of
Just CombineInventory{} -> case he ^? subInventory . ciSelection . _Just . slSec of
Just (-1) -> Just $ hud . subInventory . ciFilter . _Just
_ -> Nothing
Just DisplayTerminal{_termID = tmid} -> do