Refactor terminal prompt/maxlines into terminaltype
This commit is contained in:
@@ -6,6 +6,7 @@ module Dodge.Render.HUD (
|
||||
selNumPosCardinal, -- this shoud probably be pushed back here
|
||||
) where
|
||||
|
||||
import Dodge.Terminal.Type
|
||||
import Dodge.CharacterEnums
|
||||
import Dodge.Creature.Test
|
||||
import Dodge.DoubleTree
|
||||
@@ -354,14 +355,14 @@ displayTerminal tid cfig w = fromMaybe mempty $ do
|
||||
thelist tm =
|
||||
map toselitm . displayTermInput tm
|
||||
. reverse
|
||||
. take (_tmMaxLines tm)
|
||||
. take (getMaxLinesTM (tm ^. tmType))
|
||||
$ _tmDisplayedLines tm
|
||||
displayTermInput tm = case _tmInput tm of
|
||||
TerminalInput{_tiText = s, _tiFocus = hasfoc} ->
|
||||
(++ [(displayInputText tm s ++ displayBlinkCursor hasfoc, white)])
|
||||
partcommand tm = maybe "" (++ " ") $ tm ^? tmPartialCommand . _Just . tcString
|
||||
displayInputText tm s
|
||||
| _tmStatus tm == TerminalReady = partcommand tm ++ _tmPromptString tm ++ s
|
||||
| _tmStatus tm == TerminalReady = partcommand tm ++ getPromptTM (tm ^. tmType) ++ s
|
||||
| otherwise = ""
|
||||
displayBlinkCursor hasfoc
|
||||
-- | hasfoc = clockCycle 10 (V.fromList [[cFilledRect] , "."]) w
|
||||
|
||||
Reference in New Issue
Block a user