Start unifying regex parts of selection sections
This commit is contained in:
@@ -38,7 +38,7 @@ drawHUD cfig w = case w ^. hud . hudElement of
|
||||
DisplayCarte -> drawCarte cfig w
|
||||
DisplayInventory {_diSections = sections, _subInventory = subinv} ->
|
||||
drawHP cfig w
|
||||
<> inventoryDisplay sections w cfig
|
||||
<> inventoryDisplay (sections ^. fssSections) w cfig
|
||||
<> drawSubInventory subinv cfig w
|
||||
|
||||
drawHP :: Configuration -> World -> Picture
|
||||
@@ -93,7 +93,8 @@ 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 {_ciSections = FilterableSections {_fssSections = sss}}
|
||||
-> titledSub' cfig "COMBINE" sss
|
||||
<> combineInventoryExtra sss cfig w
|
||||
|
||||
titledSub :: Configuration -> String -> SelectionList a -> Picture
|
||||
@@ -155,11 +156,11 @@ drawNoSubInventory cfig w =
|
||||
where
|
||||
equipcursor = fromMaybe mempty $ do
|
||||
invid <- cr ^. crLeftInvSel . lisMPos
|
||||
sss <- w ^? hud . hudElement . diSections
|
||||
sss <- w ^? hud . hudElement . diSections . fssSections
|
||||
pos <- selSecSelPos 0 invid sss
|
||||
return $ listTextPictureAt 144 0 cfig pos . color cyan . text . eqPosText $_crInvEquipped cr IM.! invid
|
||||
f col invid epos = fromMaybe mempty $ do
|
||||
sss <- w ^? hud . hudElement . diSections
|
||||
sss <- w ^? hud . hudElement . diSections . fssSections
|
||||
pos <- selSecSelPos 0 invid sss
|
||||
return $ listTextPictureAt 144 0 cfig pos . color col $ text $ eqPosText epos
|
||||
equipcursors = IM.foldMapWithKey (f yellow) (_crInvEquipped cr)
|
||||
@@ -196,7 +197,7 @@ combineInventoryExtra sss cfig w = fromMaybe mempty $ do
|
||||
]
|
||||
where
|
||||
invcursor i = fromMaybe mempty $ do
|
||||
sss' <- w ^? hud . hudElement . diSections
|
||||
sss' <- w ^? hud . hudElement . diSections . fssSections
|
||||
return $ selSecDrawCursor 17 [North,South,East] cfig (invDisplayParams w) sss' 0 i
|
||||
-- fromMaybe mempty $ do
|
||||
-- i <- mi
|
||||
@@ -323,7 +324,7 @@ combineCounts cfig w = winScale cfig . foldMap f . group
|
||||
where
|
||||
f (i : is) = fromMaybe mempty $ do
|
||||
_ <- yourInv w ^? ix i . itUse . useAmount
|
||||
sss <- w ^? hud . hudElement . diSections
|
||||
sss <- w ^? hud . hudElement . diSections . fssSections
|
||||
p <- selNumTextEndPos cfig (invDisplayParams w) sss 0 i
|
||||
col <- selSecSelCol 0 i sss
|
||||
return $ color col $ uncurryV translate p . scale 0.1 0.1 . text $ ('-' : show (length is + 1))
|
||||
@@ -334,7 +335,7 @@ lnkMidPosInvSelsCol cfig w i col = winScale cfig
|
||||
. foldMap f
|
||||
where
|
||||
f j = fromMaybe mempty $ do
|
||||
sss <- w ^? hud . hudElement . diSections
|
||||
sss <- w ^? hud . hudElement . diSections . fssSections
|
||||
h <- selNumEndMidHeight cfig (invDisplayParams w) sss 0 j
|
||||
invcol <- selSecSelCol 0 j sss
|
||||
return $ zConnectCol rp (V2 18 0 + h) col white white invcol
|
||||
|
||||
Reference in New Issue
Block a user