Cleanup
This commit is contained in:
+8
-14
@@ -55,8 +55,7 @@ drawHUD cfig w = case w ^. hud of
|
||||
drawInventory sections w cfig subinv
|
||||
<> drawSubInventory subinv cfig w
|
||||
|
||||
drawInventory
|
||||
:: IM.IntMap (SelectionSection ()) -> World -> Config -> SubInventory -> Picture
|
||||
drawInventory :: IM.IntMap (SelSection ()) -> World -> Config -> SubInventory -> Picture
|
||||
drawInventory sss w cfig = \case
|
||||
DisplayTerminal {} -> mempty
|
||||
_ -> drawSelectionSections sss invDP cfig
|
||||
@@ -76,7 +75,7 @@ drawInventory sss w cfig = \case
|
||||
|
||||
drawRootCursor ::
|
||||
World ->
|
||||
IM.IntMap (SelectionSection ()) ->
|
||||
IM.IntMap (SelSection ()) ->
|
||||
Maybe (Int, Int) ->
|
||||
ListDisplayParams ->
|
||||
Config ->
|
||||
@@ -182,7 +181,7 @@ drawMapperInventory itid w = fold $ do
|
||||
|
||||
drawCombineInventory ::
|
||||
Config ->
|
||||
IM.IntMap (SelectionSection CombinableItem) ->
|
||||
IM.IntMap (SelSection CombItem) ->
|
||||
World ->
|
||||
Picture
|
||||
drawCombineInventory cfig sss w =
|
||||
@@ -318,7 +317,7 @@ equipAllocString = \case
|
||||
RemoveEquipment{} -> "TAKE OFF"
|
||||
|
||||
drawItemConnections ::
|
||||
IM.IntMap (SelectionSection ()) ->
|
||||
IM.IntMap (SelSection ()) ->
|
||||
Config ->
|
||||
IM.IntMap (Maybe (Int, Int), [Int], [Int]) ->
|
||||
Picture
|
||||
@@ -327,12 +326,7 @@ drawItemConnections sss cfig =
|
||||
. IM.foldMapWithKey (drawItemChildrenConnect sss cfig)
|
||||
. fmap (\(_, a, b) -> a <> b)
|
||||
|
||||
drawItemChildrenConnect ::
|
||||
IM.IntMap (SelectionSection ()) ->
|
||||
Config ->
|
||||
Int ->
|
||||
[Int] ->
|
||||
Picture
|
||||
drawItemChildrenConnect :: IM.IntMap (SelSection ()) -> Config -> Int -> [Int] -> Picture
|
||||
drawItemChildrenConnect sss cfig i is = fromMaybe mempty $ do
|
||||
p <- snum i
|
||||
let ps = mapMaybe snum is
|
||||
@@ -341,7 +335,7 @@ drawItemChildrenConnect sss cfig i is = fromMaybe mempty $ do
|
||||
snum = selNumPos cfig invDP sss 0
|
||||
|
||||
combineInventoryExtra ::
|
||||
IM.IntMap (SelectionSection CombinableItem) ->
|
||||
IM.IntMap (SelSection CombItem) ->
|
||||
Maybe (Int, Int) ->
|
||||
Config ->
|
||||
World ->
|
||||
@@ -477,7 +471,7 @@ selNumPosCardinal ::
|
||||
CardinalEightPoint ->
|
||||
Config ->
|
||||
ListDisplayParams ->
|
||||
IM.IntMap (SelectionSection a) ->
|
||||
IM.IntMap (SelSection a) ->
|
||||
Int ->
|
||||
Int ->
|
||||
Maybe Point2
|
||||
@@ -504,5 +498,5 @@ selNumPosCardinal card cfig ldp sss i j = do
|
||||
s = _ldpScale ldp
|
||||
ygap = _ldpVerticalGap ldp
|
||||
|
||||
selSecSelCol :: Int -> Int -> IM.IntMap (SelectionSection a) -> Maybe Color
|
||||
selSecSelCol :: Int -> Int -> IM.IntMap (SelSection a) -> Maybe Color
|
||||
selSecSelCol i j = (^? ix i . ssItems . ix j . siColor)
|
||||
|
||||
Reference in New Issue
Block a user