Refactor terminal prompt/maxlines into terminaltype
This commit is contained in:
@@ -18,6 +18,7 @@ module Dodge.Terminal (
|
||||
terminalReturnEffect,
|
||||
) where
|
||||
|
||||
import Dodge.Terminal.Type
|
||||
import Control.Monad
|
||||
import Color
|
||||
import Data.Char
|
||||
@@ -37,7 +38,6 @@ basicTerminal =
|
||||
defaultTerminal
|
||||
{ _tmDisplayedLines = []
|
||||
, _tmFutureLines = []
|
||||
, _tmMaxLines = 14
|
||||
, _tmTitle = "TERMINAL"
|
||||
, _tmScrollCommands = [quitCommand]
|
||||
, _tmWriteCommands = [helpCommand, commandsCommand]
|
||||
@@ -283,7 +283,7 @@ terminalReturnEffect tm w = fromMaybe w $ do
|
||||
w
|
||||
& cWorld . lWorld . terminals . ix (_tmID tm) . tmPartialCommand .~ Nothing
|
||||
& cWorld . lWorld . terminals . ix (_tmID tm) . tmFutureLines
|
||||
.~ [makeTermLine (pc ++ _tmPromptString tm ++ s)]
|
||||
.~ [makeTermLine (pc ++ getPromptTM (tm ^. tmType) ++ s)]
|
||||
|
||||
runTerminalString :: String -> Terminal -> World -> World
|
||||
runTerminalString s tm w =
|
||||
|
||||
Reference in New Issue
Block a user