Work on terminals: allow scrolling to get default inputs

This commit is contained in:
2022-06-01 22:22:46 +01:00
parent 0585236a01
commit 0da298bde9
10 changed files with 140 additions and 95 deletions
+5 -5
View File
@@ -88,13 +88,13 @@ subInventoryDisplay subinv cfig w = case subinv of
[ invHead cfig (_termTitle tp ++ ":T" ++ show tid)
, renderListAt subInvX 60 cfig
. displayTermInput tp
. (++ (map (\(str,_) -> (str,white)) (_termOptions tp)))
-- . (++ map (\(str,_) -> (str,white)) (_termOptions tp))
. reverse
. take (_termMaxLines tp)
$ _termDisplayedLines tp <&> ($ w)
, fromMaybe mempty $ do
cursori <- _termSel tp <&> (+ _termMaxLines tp)
return $ listCursorNSW subInvX 60 cfig cursori white 15 1
-- , fromMaybe mempty $ do
-- cursori <- _termSel tp <&> (+ _termMaxLines tp)
-- return $ listCursorNSW subInvX 60 cfig cursori white 15 1
]
CombineInventory mi -> pictures
[ invHead cfig "COMBINE"
@@ -124,7 +124,7 @@ subInventoryDisplay subinv cfig w = case subinv of
where
displayTermInput tp = case _termInput tp of
Nothing -> id
Just (s,_) -> (++ [('>':T.unpack s++clockCycle 10 (V.fromList ["_",""]) w,white)])
Just s -> (++ [('>':T.unpack s++clockCycle 10 (V.fromList ["_",""]) w,white)])
closeobjectcursor = case selectedCloseObject w of
Nothing -> mempty
Just (i,co) -> listCursorNS clObjFloatIn 0 cfig (selNumPos i w) (closeObjectCol co) topInvW (invSelSize i w)