Add files, move towards joining items in inventory

This commit is contained in:
2024-09-09 23:13:00 +01:00
parent db4a6a10de
commit 52d0008441
12 changed files with 230 additions and 270 deletions
+19 -19
View File
@@ -33,7 +33,7 @@ import Dodge.Tweak.Show
import Geometry
import qualified IntMapHelp as IM
import Justify
import ListHelp
--import ListHelp
import Padding
import Picture
import SDL (MouseButton (..))
@@ -198,7 +198,7 @@ combineInventoryExtra sss cfig w = fromMaybe mempty $ do
return $
lnkMidPosInvSelsCol cfig w j col lnks
<> foldMap invcursor lnks
<> combineCounts cfig w lnks
-- <> combineCounts cfig w lnks
]
where
invcursor i = fromMaybe mempty $ do
@@ -233,23 +233,23 @@ displayTerminal tid cfig w = fromMaybe mempty $ do
| hasfoc = clockCycle 10 (V.fromList ["_", "."]) w
| otherwise = []
combineCounts :: Configuration -> World -> [Int] -> Picture
combineCounts cfig w = foldMap f . group
where
-- f (i : is) = fromMaybe mempty $ do
-- _ <- yourInv w ^? ix i . itUse . useAmount
-- sss <- w ^? hud . hudElement . diSections
-- --p <- selNumTextEndPos cfig (invDisplayParams w) sss 0 i
-- col <- selSecSelCol 0 i sss
-- yint <- selSecYint 0 i sss
-- --return $ color col $ uncurryV translate p . scale 0.1 0.1 . text $ ('-' : show (length is + 1))
-- return
-- . translateScreenPos cfig (invDisplayParams w ^. ldpPos)
-- . color col
-- . drawListElement 0 1 15 yint
-- . text
-- $ ('-' : show (length is + 1))
f _ = mempty
--combineCounts :: Configuration -> World -> [Int] -> Picture
--combineCounts cfig w = foldMap f . group
-- where
---- f (i : is) = fromMaybe mempty $ do
---- _ <- yourInv w ^? ix i . itUse . useAmount
---- sss <- w ^? hud . hudElement . diSections
---- --p <- selNumTextEndPos cfig (invDisplayParams w) sss 0 i
---- col <- selSecSelCol 0 i sss
---- yint <- selSecYint 0 i sss
---- --return $ color col $ uncurryV translate p . scale 0.1 0.1 . text $ ('-' : show (length is + 1))
---- return
---- . translateScreenPos cfig (invDisplayParams w ^. ldpPos)
---- . color col
---- . drawListElement 0 1 15 yint
---- . text
---- $ ('-' : show (length is + 1))
-- f _ = mempty
lnkMidPosInvSelsCol :: Configuration -> World -> Int -> Color -> [Int] -> Picture
lnkMidPosInvSelsCol cfig w i col = foldMap f