Use NewIntMap InvInt for crInv
This commit is contained in:
@@ -82,7 +82,7 @@ drawRootCursor w sss msel ldp cfig = fromMaybe mempty $ do
|
||||
guard $ i == 0
|
||||
inv' <- w ^? cWorld . lWorld . creatures . ix 0 . crInv
|
||||
let inv = fmap (\k -> w ^?! cWorld . lWorld . items . ix k) inv'
|
||||
(x, y) <- getRootItemBounds j inv
|
||||
(x, y) <- getRootItemBounds j $ _unNIntMap inv
|
||||
return $
|
||||
drawSSMultiCursor
|
||||
sss
|
||||
@@ -94,11 +94,11 @@ drawRootCursor w sss msel ldp cfig = fromMaybe mempty $ do
|
||||
|
||||
getRootItemBounds :: Int -> IM.IntMap Item -> Maybe (Int, Int)
|
||||
getRootItemBounds i inv = do
|
||||
let ia = invIndents inv -- why indents? why OItem?
|
||||
let ia = invIndents $ NIntMap inv -- why indents? why OItem?
|
||||
itm <- ia ^? ix i . _2
|
||||
let root = locToTop itm
|
||||
x <- locDTRightmost root ^? locDT . dtValue . _1 . itLocation . ilInvID
|
||||
y <- locDTLeftmost root ^? locDT . dtValue . _1 . itLocation . ilInvID
|
||||
x <- locDTRightmost root ^? locDT . dtValue . _1 . itLocation . ilInvID . unNInt
|
||||
y <- locDTLeftmost root ^? locDT . dtValue . _1 . itLocation . ilInvID . unNInt
|
||||
return (x, y)
|
||||
|
||||
drawMouseOver :: Configuration -> World -> Picture
|
||||
|
||||
Reference in New Issue
Block a user