Move towards displaying tree links in inventory
This commit is contained in:
+10
-1
@@ -3,6 +3,7 @@ module Dodge.Render.HUD (
|
||||
drawHUD,
|
||||
) where
|
||||
|
||||
import Dodge.Item.Grammar
|
||||
import Dodge.Inventory.RBList
|
||||
import Control.Lens
|
||||
import Control.Monad
|
||||
@@ -56,7 +57,12 @@ drawHP cfig =
|
||||
. (^?! cWorld . lWorld . creatures . ix 0 . crHP)
|
||||
|
||||
drawInventory :: SelectionSections () -> World -> Configuration -> Picture
|
||||
drawInventory sss = drawSelectionSections sss . invDisplayParams
|
||||
drawInventory sss w cfig = drawSelectionSections sss (invDisplayParams w) cfig
|
||||
<> iextra
|
||||
where
|
||||
iextra = fromMaybe mempty $ do
|
||||
inv <- w ^? cWorld . lWorld . creatures . ix 0 . crInv
|
||||
return $ inventoryExtra cfig (invAdj inv) (fmap (^._2) $ invIndentIM inv)
|
||||
|
||||
drawSubInventory :: SubInventory -> Configuration -> World -> Picture
|
||||
drawSubInventory subinv cfig w = case subinv of
|
||||
@@ -177,6 +183,9 @@ examineInventoryExtra mtweaki cfig = fromMaybe mempty $ do
|
||||
translate subInvX (-71) $
|
||||
listCursorChooseBorderScale 0 1 [North, South, West] tweaki 0 white 10 1
|
||||
|
||||
inventoryExtra :: Configuration -> IM.IntMap ([Int],[Int]) -> IM.IntMap Int -> Picture
|
||||
inventoryExtra = undefined
|
||||
|
||||
combineInventoryExtra :: SelectionSections CombinableItem -> Configuration -> World -> Picture
|
||||
combineInventoryExtra sss cfig w = fromMaybe mempty $ do
|
||||
(i, j) <- sss ^? sssExtra . sssSelPos . _Just
|
||||
|
||||
Reference in New Issue
Block a user