Tweak close item usage code

This commit is contained in:
2023-02-17 19:14:10 +00:00
parent 90370e5487
commit 56f2dc04cf
3 changed files with 20 additions and 62 deletions
+4 -2
View File
@@ -303,7 +303,8 @@ combineCounts cfig w = winScale cfig . foldMap f . group
_ <- yourInv w ^? ix i . itUse . useAmount
sss <- w ^? hud . hudElement . diSections
p <- selNumTextEndPos cfig (invDisplayParams w) sss 0 i
return $ color (selNumCol i w) $ uncurryV translate p . scale 0.1 0.1 . text $ ('-' : show (length is + 1))
col <- selSecSelCol 0 i sss
return $ color col $ uncurryV translate p . scale 0.1 0.1 . text $ ('-' : show (length is + 1))
f _ = mempty
lnkMidPosInvSelsCol :: Configuration -> World -> Int -> Color -> [Int] -> Picture
@@ -313,7 +314,8 @@ lnkMidPosInvSelsCol cfig w i col = winScale cfig
f j = fromMaybe mempty $ do
sss <- w ^? hud . hudElement . diSections
h <- selNumEndMidHeight cfig (invDisplayParams w) sss 0 j
return $ zConnectCol rp (V2 18 0 + h) col white white (selNumCol j w)
invcol <- selSecSelCol 0 j sss
return $ zConnectCol rp (V2 18 0 + h) col white white invcol
rp = V2 (190 - hw) (hh - (20 * fromIntegral i + 77.5))
hh = halfHeight cfig
hw = halfWidth cfig