Start to refactor terminals
This commit is contained in:
@@ -6,6 +6,7 @@ module Dodge.Render.HUD (
|
||||
selNumPosCardinal, -- this shoud probably be pushed back here
|
||||
) where
|
||||
|
||||
import Dodge.CharacterEnums
|
||||
import Dodge.Creature.Test
|
||||
import Dodge.DoubleTree
|
||||
import Dodge.Data.DoubleTree
|
||||
@@ -14,9 +15,9 @@ import Control.Lens
|
||||
import Control.Monad
|
||||
import qualified Data.Map.Strict as M
|
||||
import Data.Maybe
|
||||
import qualified Data.Vector as V
|
||||
--import qualified Data.Vector as V
|
||||
import Dodge.Base
|
||||
import Dodge.Clock
|
||||
--import Dodge.Clock
|
||||
import Dodge.Creature.Info
|
||||
import Dodge.Data.CardinalPoint
|
||||
import Dodge.Data.Combine
|
||||
@@ -360,11 +361,12 @@ displayTerminal tid cfig w = fromMaybe mempty $ do
|
||||
(++ [(displayInputText tm s ++ displayBlinkCursor hasfoc, white)])
|
||||
partcommand tm = maybe "" (++ " ") $ tm ^? tmPartialCommand . _Just . tcString
|
||||
displayInputText tm s
|
||||
| _tmStatus tm == TerminalReady = partcommand tm ++ "> " ++ s
|
||||
| _tmStatus tm == TerminalReady = partcommand tm ++ _tmPromptString tm ++ s
|
||||
| otherwise = ""
|
||||
displayBlinkCursor hasfoc
|
||||
| hasfoc = clockCycle 10 (V.fromList ["_", "."]) w
|
||||
| otherwise = []
|
||||
-- | hasfoc = clockCycle 10 (V.fromList [[cFilledRect] , "."]) w
|
||||
| hasfoc = [cFilledRect]
|
||||
| otherwise = [cWireRect]
|
||||
|
||||
lnkMidPosInvSelsCol :: Configuration -> World -> Int -> Color -> [Int] -> Picture
|
||||
lnkMidPosInvSelsCol cfig w i col = fromMaybe mempty . foldMap f
|
||||
|
||||
Reference in New Issue
Block a user