Allow to equip left click items
This commit is contained in:
@@ -108,7 +108,13 @@ renderItemMapAt :: Float -> Float -> World -> IM.IntMap Item -> Picture
|
||||
renderItemMapAt tx ty w = concatMapPic (uncurry $ listItemAt tx ty w) . IM.toList
|
||||
|
||||
displayInv :: Int -> World -> Picture
|
||||
displayInv n w = renderItemMapAt 0 0 w . _crInv $ _creatures w IM.! n
|
||||
displayInv n w = (renderItemMapAt 0 0 w $ _crInv cr)
|
||||
<> equipcursor
|
||||
where
|
||||
equipcursor = case _crLeftInvSel cr of
|
||||
Nothing -> mempty
|
||||
Just invid -> openCursorAt 20 yellow 105 0 invid w
|
||||
cr = _creatures w IM.! n
|
||||
|
||||
drawLocations :: World -> Picture
|
||||
drawLocations w = pictures $
|
||||
|
||||
Reference in New Issue
Block a user