Move combine list over to SelectionSections -- more todo

This commit is contained in:
2023-02-18 10:59:59 +00:00
parent 36b9b5445c
commit 6eca3bab38
10 changed files with 119 additions and 160 deletions
+7 -6
View File
@@ -2,6 +2,7 @@
module Dodge.Render.HUD (
drawHUD,
invDisplayParams,
secondColumnParams,
) where
import Dodge.Inventory
@@ -68,7 +69,7 @@ invDisplayParams w =
Just ExamineInventory{} -> True
_ -> False
drawSelectionSections :: SelectionSections () -> ListDisplayParams -> Configuration -> Picture
drawSelectionSections :: SelectionSections a -> ListDisplayParams -> Configuration -> Picture
drawSelectionSections sss ldps cfig = listPicturesAtScaleOff
(_ldpVerticalGap ldps)
(_ldpScale ldps)
@@ -94,18 +95,18 @@ drawSubInventory subinv cfig w = case subinv of
NoSubInventory -> drawNoSubInventory cfig w
ExamineInventory mtweaki -> drawExamineInventory cfig mtweaki w
DisplayTerminal tid -> displayTerminal tid cfig (w ^. cWorld . lWorld)
CombineInventory _ sss -> titledSub' cfig "COMBINE" sss
CombineInventory _ _ sss -> titledSub' cfig "COMBINE" sss
<> combineInventoryExtra sss cfig w
titledSub :: Configuration -> String -> SelectionSections a -> Picture
titledSub cfig subtitle sss =
titledSub :: Configuration -> String -> SelectionList a -> Picture
titledSub cfig subtitle subitems =
invHead cfig subtitle
<> drawSelectionList sss secondColumnParams cfig
<> drawSelectionList secondColumnParams cfig subitems
titledSub' :: Configuration -> String -> SelectionSections a -> Picture
titledSub' cfig subtitle subitems =
invHead cfig subtitle
<> drawSelectionSections secondColumnParams cfig subitems
<> drawSelectionSections subitems secondColumnParams cfig
drawExamineInventory :: Configuration -> Maybe Int -> World -> Picture
drawExamineInventory cfig mtweaki w =