Commit before messing with main inventory display

This commit is contained in:
2023-01-24 11:54:59 +00:00
parent 5810c2262a
commit ce25157738
13 changed files with 74 additions and 55 deletions
+5 -4
View File
@@ -22,7 +22,7 @@ updateWheelEvent yi w = case w ^. hud . hudElement of
DisplayCarte
| rbDown -> w & hud . carteZoom %~ min 0.75 . max 0.05 . ((1 + y * 0.1) *)
| otherwise -> w & cWorld . lWorld . selLocation %~ (`mod` numLocs) . (+ yi)
DisplayInventory NoSubInventory
DisplayInventory {_subInventory = NoSubInventory}
-- functions that modify the inventory should be centralised so that
-- this lock can be sensibly applied, perhaps
| w ^?! cWorld . lWorld . creatures . ix 0 . crInvLock -> w
@@ -33,13 +33,14 @@ updateWheelEvent yi w = case w ^. hud . hudElement of
| lbDown -> w & cWorld . camPos . camZoom +~ y
| invKeyDown -> changeSwapInvSel yi w
| otherwise -> stopSoundFrom (CrReloadSound 0) $ changeAugInvSel yi w
DisplayInventory (ExamineInventory mi)
DisplayInventory {_subInventory = ExamineInventory mi}
| invKeyDown && rbDown -> w & moveTweakSel yi
| invKeyDown -> stopSoundFrom (CrReloadSound 0) $ changeInvSel yi w
| rbDown -> w & changeTweakParam mi yi
| otherwise -> w & moveTweakSel yi
DisplayInventory (CombineInventory SelectionIntMap {_smRegexInput = False}) -> w & moveCombineSel yi
DisplayInventory (DisplayTerminal tmid) -> terminalWheelEvent yi tmid w
DisplayInventory {_subInventory = CombineInventory SelectionIntMap {_smRegexInput = False}}
-> w & moveCombineSel yi
DisplayInventory {_subInventory = DisplayTerminal tmid} -> terminalWheelEvent yi tmid w
_ -> w
where
y = fromIntegral yi