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
+2 -2
View File
@@ -35,7 +35,7 @@ yourControl _ w
intopinv = fromMaybe False $ do
subinv <- w ^? hud . hudElement . subInventory
Just $ case subinv of
NoSubInventory -> True
NoSubInventory{} -> True
_ -> False
handleHotkeys :: World -> World
@@ -169,7 +169,7 @@ pressedMBEffectsTopInventory pkeys w
where
youhammerdown = set (cWorld . lWorld . creatures . ix 0 . crHammerPosition) HammerDown
inTopInv = case w ^. hud . hudElement of
DisplayInventory{_subInventory = NoSubInventory} -> True
DisplayInventory{_subInventory = NoSubInventory{}} -> True
_ -> False
isDown but = but `M.member` pkeys
rotation =