Allow to equip left click items

This commit is contained in:
2021-11-27 02:01:12 +00:00
parent 774808663a
commit e7ea7377e2
21 changed files with 93 additions and 116 deletions
+7 -1
View File
@@ -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 $