This commit is contained in:
2025-08-19 17:29:36 +01:00
parent 2f9cea1b69
commit b07280e50c
13 changed files with 107 additions and 280 deletions
+5 -7
View File
@@ -343,13 +343,12 @@ combineInventoryExtra ::
Configuration ->
World ->
Picture
combineInventoryExtra sss msel cfig w = fromMaybe mempty $ do
combineInventoryExtra sss msel cfig w = fold $ do
(i, j) <- msel
si <- sss ^? ix i . ssItems . ix j
let col = _siColor si
lnks <- si ^? siPayload . ciInvIDs
return (lnkMidPosInvSelsCol cfig w j col lnks)
<> foldMap invcursor lnks
return (lnkMidPosInvSelsCol cfig w j col lnks) <> foldMap invcursor lnks
where
invcursor i = do
sss' <- w ^? hud . hudElement . diSections
@@ -362,12 +361,12 @@ combineInventoryExtra sss msel cfig w = fromMaybe mempty $ do
(Just (0, i))
drawTerminalDisplay :: Int -> Configuration -> LWorld -> Picture
drawTerminalDisplay tid cfig w = fromMaybe mempty $ do
drawTerminalDisplay tid cfig w = fold $ do
tm <- w ^? terminals . ix tid
let tsize = getMaxLinesTM + 1
return $
invHead cfig ("T-" ++ show tid)
<> drawSelectionList secondColumnParams cfig (thesellist tm)
<> drawSelectionList secondColumnParams cfig (f tm)
<> color
(withAlpha 0.5 green) -- consider integrating termScreenColor somehow
(drawSelectionListBackground secondColumnParams cfig tsize)
@@ -375,8 +374,7 @@ drawTerminalDisplay tid cfig w = fromMaybe mempty $ do
where
toselitm (str, col) = SelectionItem [str] 1 55 True col 0 ()
-- not sure if the width (55) is correct here
thesellist tm = thelist tm
thelist tm =
f tm =
map toselitm . displayTermInput tm
. reverse
. take getMaxLinesTM