Partial rethink of terminal text input

This commit is contained in:
2025-08-14 21:48:02 +01:00
parent 5b720cb82c
commit 91d19e7c42
12 changed files with 142 additions and 167 deletions
+10 -7
View File
@@ -365,7 +365,7 @@ drawTerminalDisplay tid cfig w = fromMaybe mempty $ do
tm <- w ^? terminals . ix tid
let tsize = getMaxLinesTM + 1
return $
invHead cfig (_tmTitle tm ++ ":T" ++ show tid)
invHead cfig ("T-" ++ show tid)
<> drawSelectionList secondColumnParams cfig (thesellist tm)
<> color
(withAlpha 0.5 green) -- consider integrating termScreenColor somehow
@@ -380,13 +380,16 @@ drawTerminalDisplay tid cfig w = fromMaybe mempty $ do
. reverse
. take getMaxLinesTM
$ _tmDisplayedLines tm
displayTermInput tm = case _tmInput tm of
TerminalInput{_tiText = s} ->
(++ [(displayInputText tm s ++ [cFilledRect], white)])
displayTermInput tm = case _tmStatus tm of
TerminalOff -> id
TerminalBusy -> (++ [([cFilledRect], white)])
TerminalTextInput s ->
(++ [(getPromptTM ++ s ++ [cFilledRect], white)])
partcommand tm = maybe "" (++ " ") $ tm ^? tmPartialCommand . _Just . tcString
displayInputText tm s
| _tmStatus tm == TerminalReady = partcommand tm ++ getPromptTM ++ s
| otherwise = ""
-- displayInputText tm s
-- | TerminalTextInput <- _tmStatus tm = getPromptTM ++ s
---- | _tmStatus tm == TerminalReady = partcommand tm ++ getPromptTM ++ s
-- | otherwise = ""
-- | hasfoc = clockCycle 10 (V.fromList [[cFilledRect] , "."]) w