Allow use of items while examine subinventory shows
Still not sure what to do with right click scrolling, item swapping
This commit is contained in:
@@ -14,15 +14,15 @@ import Dodge.SelectionSections
|
||||
--import Dodge.SoundLogic
|
||||
import Dodge.Terminal
|
||||
--import Dodge.Tweak
|
||||
import qualified IntMapHelp as IM
|
||||
--import qualified IntMapHelp as IM
|
||||
import LensHelp
|
||||
import SDL
|
||||
|
||||
updateWheelEvent :: Int -> World -> World
|
||||
updateWheelEvent yi w = case w ^. hud . hudElement of
|
||||
DisplayCarte
|
||||
| bdown ButtonRight -> w & hud . carteZoom %~ min 0.75 . max 0.05 . ((1 + y * 0.1) *)
|
||||
| otherwise -> w & cWorld . lWorld . selLocation %~ (`mod` numLocs) . (+ yi)
|
||||
-- DisplayCarte
|
||||
-- | bdown ButtonRight -> w & hud . carteZoom %~ min 0.75 . max 0.05 . ((1 + y * 0.1) *)
|
||||
-- | otherwise -> w & cWorld . lWorld . selLocation %~ (`mod` numLocs) . (+ yi)
|
||||
DisplayInventory{_subInventory = NoSubInventory{}}
|
||||
-- functions that modify the inventory should be centralised so that
|
||||
-- this lock can be sensibly applied, perhaps
|
||||
@@ -46,7 +46,7 @@ updateWheelEvent yi w = case w ^. hud . hudElement of
|
||||
esite <- you w ^? crInv . ix invid . itUse . uequipEffect . eeType
|
||||
return $ length $ eqSiteToPositions esite
|
||||
y = fromIntegral yi
|
||||
numLocs = (fst . IM.findMax $ (w ^. cWorld . lWorld . seenLocations)) + 1
|
||||
-- numLocs = (fst . IM.findMax $ (w ^. cWorld . lWorld . seenLocations)) + 1
|
||||
bdown b = b `M.member` _mouseButtons (_input w)
|
||||
invKeyDown = ScancodeCapsLock `M.member` _pressedKeys (_input w)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user