Allow terminals to block input
This commit is contained in:
@@ -6,6 +6,7 @@ import Dodge.Data
|
||||
import Dodge.Combine
|
||||
import Dodge.Clock
|
||||
import Dodge.Base
|
||||
--import Dodge.InputFocus
|
||||
--import Dodge.Combine.Combinations
|
||||
import Dodge.Inventory
|
||||
import Dodge.Inventory.ItemSpace
|
||||
@@ -144,10 +145,12 @@ displayTerminal tid cfig w = fromMaybe mempty $ do
|
||||
$ _tmDisplayedLines tm
|
||||
]
|
||||
where
|
||||
displayTermInput tp = case _tmInput tp of
|
||||
TerminalInput s inputstatus _
|
||||
-> (++ [('>':T.unpack s++displayBlinkCursor inputstatus,white)])
|
||||
displayBlinkCursor inputstatus | inputstatus = clockCycle 10 (V.fromList ["_",""]) w
|
||||
displayTermInput tm = case _tmInput tm of
|
||||
TerminalInput s hasfoc _ -> (++ [(displayInputText tm s++displayBlinkCursor hasfoc,white)])
|
||||
displayInputText tm s
|
||||
| _tmStatus tm == TerminalReady = '>':T.unpack s
|
||||
| otherwise = ""
|
||||
displayBlinkCursor hasfoc | hasfoc = clockCycle 10 (V.fromList ["_",""]) w
|
||||
| otherwise = []
|
||||
|
||||
drawRBOptions :: Configuration -> World -> RightButtonOptions -> Picture
|
||||
|
||||
Reference in New Issue
Block a user