Start to generalise text input to "terminal signal" input

This commit is contained in:
2023-03-26 13:57:26 +01:00
parent cfb0a49059
commit 082ce9c9a1
39 changed files with 171 additions and 165 deletions
+3 -3
View File
@@ -8,6 +8,7 @@ import qualified Data.Map.Strict as M
import Data.Maybe
import Dodge.Base.You
import Dodge.Button.Event
import Dodge.Camera
import Dodge.Creature.Action
import Dodge.Data.Combine
import Dodge.Data.Universe
@@ -46,9 +47,6 @@ updateUseInputInGame h u = case h of
(uvWorld . worldEventFlags . at InventoryChange ?~ ()) . maybeExitCombine $
over uvWorld (tryCombine sss) u
& uvWorld . worldEventFlags . at CombineInventoryChange ?~ ()
-- _ -> case regexFocus w of
-- Nothing -> M.foldlWithKey' updateKeyInGame u pkeys
-- Just (filtpoint,selpoint,i) -> u & uvWorld . p %~ doRegexInput
_
| inInvRegex (u ^. uvWorld) ->
u & uvWorld . hud . hudElement . diSections %~ doRegexInput u (-1)
@@ -108,6 +106,8 @@ updateKeyInGame uv sc pt = case pt of
updateInitialPressInGame :: Universe -> Scancode -> Universe
updateInitialPressInGame uv sc = case sc of
ScancodeF2 -> pauseAndFloatCam uv
ScancodeF3 -> pauseAndPanCam uv
ScancodeF5 -> doQuicksave uv
ScancodeF9 -> doQuickload uv
ScancodeEscape -> pauseGame uv