Work on press-continue terminal prompts
This commit is contained in:
@@ -219,6 +219,7 @@ updateMouseClickInGame cfig w = case w ^. input . mouseContext of
|
||||
w & input . mouseContext .~ OverInvDragSelect x (Just $ snd x)
|
||||
OverInvSelect x -> startDrag x cfig w
|
||||
OverTerminalReturn tmid -> terminalReturnEffect tmid w
|
||||
OverTerminalContinue tmid -> undefined
|
||||
OverTerminalEscape -> w & hud . hudElement . subInventory .~ NoSubInventory
|
||||
OverCombSelect x ->
|
||||
w & hud . hudElement . subInventory . ciSelection ?~ f x
|
||||
@@ -381,7 +382,19 @@ updateFunctionKey uv ScancodeF4 _ = doDebugTest2 uv
|
||||
updateFunctionKey uv _ _ = uv
|
||||
|
||||
updateKeysInTerminal :: Int -> Universe -> Universe
|
||||
updateKeysInTerminal tmid u =
|
||||
updateKeysInTerminal tmid u = fromMaybe u $ do
|
||||
tm <- u ^? uvWorld . cWorld . lWorld . terminals . ix tmid
|
||||
return $ case tm ^. tmStatus of
|
||||
TerminalTextInput{} -> updateKeysTextInputTerminal tmid u
|
||||
TerminalPressTo{} -> updateKeyContinueTerminal tmid u
|
||||
_ -> u
|
||||
updateKeyContinueTerminal :: Int -> Universe -> Universe
|
||||
updateKeyContinueTerminal tmid u
|
||||
| any (==0) $ u ^. uvWorld . input . pressedKeys =
|
||||
u & uvWorld . cWorld . lWorld . terminals . ix tmid . tmStatus .~ TerminalLineRead
|
||||
| otherwise = u
|
||||
updateKeysTextInputTerminal :: Int -> Universe -> Universe
|
||||
updateKeysTextInputTerminal tmid u =
|
||||
u
|
||||
& doTextInputOverUniverse
|
||||
(uvWorld . cWorld . lWorld . terminals . ix tmid . tmStatus . tiText)
|
||||
|
||||
Reference in New Issue
Block a user