Move towards inputs in terminal
This commit is contained in:
@@ -4,6 +4,7 @@ module Dodge.Render.HUD
|
||||
) where
|
||||
import Dodge.Data
|
||||
import Dodge.Combine
|
||||
import Dodge.Clock
|
||||
import Dodge.Base
|
||||
--import Dodge.Combine.Combinations
|
||||
import Dodge.Inventory
|
||||
@@ -15,6 +16,7 @@ import Geometry
|
||||
import Padding
|
||||
import ListHelp
|
||||
|
||||
import qualified Data.Vector as V
|
||||
--import Data.Foldable
|
||||
import Data.Maybe
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
@@ -81,9 +83,10 @@ subInventoryDisplay subinv cfig w = case subinv of
|
||||
, invHead cfig "TWEAK"
|
||||
, listTextPicturesAt subInvX 60 cfig $ map text (ammoTweakStrings it)
|
||||
]
|
||||
DisplayTerminal {_termParams = tp} -> pictures
|
||||
[ invHead cfig (_termTitle tp)
|
||||
DisplayTerminal {_termParams = tp,_termID = tid} -> pictures
|
||||
[ invHead cfig (_termTitle tp ++ ":T" ++ show tid)
|
||||
, renderListAt subInvX 60 cfig
|
||||
. displayTermInput tp
|
||||
. (++ (map (\(str,_) -> (str,white)) (_termOptions tp)))
|
||||
. reverse
|
||||
. take (_termMaxLines tp)
|
||||
@@ -118,6 +121,9 @@ subInventoryDisplay subinv cfig w = case subinv of
|
||||
]
|
||||
InspectInventory -> invHead cfig "INSPECT"
|
||||
where
|
||||
displayTermInput tp = case _termInput tp of
|
||||
Nothing -> id
|
||||
Just (s,_) -> (++ [('>':s++clockCycle 10 (V.fromList ["_",""]) w,white)])
|
||||
closeobjectcursor = case selectedCloseObject w of
|
||||
Nothing -> mempty
|
||||
Just (i,co) -> listCursorNS clObjFloatIn 0 cfig (selNumPos i w) (closeObjectCol co) topInvW (invSelSize i w)
|
||||
|
||||
@@ -8,12 +8,14 @@ import Picture
|
||||
import Dodge.Menu
|
||||
import Padding
|
||||
|
||||
import qualified Data.Text as T
|
||||
|
||||
menuScreen :: Universe -> ScreenLayer -> Picture
|
||||
menuScreen w screen = case screen of
|
||||
OptionScreen {_scTitle = titf, _scOptions = mos}
|
||||
-> drawOptions w (titf w) mos "Use keys to navigate the menu"
|
||||
(WaitScreen sf _) -> drawOptions w (sf w) [] ""
|
||||
(InputScreen inputstr help) -> drawOptions w inputstr [] help
|
||||
(InputScreen inputstr help) -> drawOptions w ('>':T.unpack inputstr) [] help
|
||||
(DisplayScreen sd ) -> sd w
|
||||
(ColumnsScreen titf pairs) -> drawTwoColumnsScreen (_config w) (titf w) pairs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user