Partial rethink of terminal text input
This commit is contained in:
+10
-7
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user