Start adding mouse control of inventory

This commit is contained in:
2024-10-15 23:26:08 +01:00
parent e745238b8f
commit cf0873d73b
18 changed files with 333 additions and 269 deletions
+3 -3
View File
@@ -30,7 +30,7 @@ regexScope ::
Maybe
((SSSExtra -> f SSSExtra) -> HUDElement -> f HUDElement, Int)
regexScope w = case w ^? hud . hudElement . subInventory of
Just NoSubInventory -> case he ^? diSections . sssExtra . sssSelPos . _Just of
Just NoSubInventory{} -> case he ^? diSections . sssExtra . sssSelPos . _Just of
Just (-1, _) -> di (-1)
Just (0, _) -> di (-1)
Just (2, _) -> di 2
@@ -49,7 +49,7 @@ regexFocus ::
Maybe
((SSSExtra -> f SSSExtra) -> HUDElement -> f HUDElement, Int)
regexFocus w = case w ^? hud . hudElement . subInventory of
Just NoSubInventory -> case he ^? diSections . sssExtra . sssSelPos . _Just of
Just NoSubInventory{} -> case he ^? diSections . sssExtra . sssSelPos . _Just of
Just (-1, _) -> di (-1)
Just (2, _) -> di 2
_ -> Nothing
@@ -71,7 +71,7 @@ inputFocus ::
World ->
Maybe ((String -> f String) -> World -> f World)
inputFocus w = case w ^? hud . hudElement . subInventory of
Just NoSubInventory -> case he ^? diSections . sssExtra . sssSelPos . _Just of
Just NoSubInventory{} -> case he ^? diSections . sssExtra . sssSelPos . _Just of
Just (-1, _) -> di (-1)
Just (2, _) -> di 2
_ -> Nothing