Commit before pushing more input events into update

This commit is contained in:
2022-10-29 22:33:10 +01:00
parent afaef480db
commit e3155752ba
36 changed files with 121 additions and 147 deletions
+2 -8
View File
@@ -5,10 +5,6 @@ module Dodge.Event.Keyboard (
guardDisconnectedID,
) where
--import Color
--import Data.List
import Data.Maybe
import qualified Data.Set as S
--import Data.Text (unpack)
@@ -35,8 +31,8 @@ import SDL
-- also, note that this currently "doubles" the inputs to both terminals if both
-- are open
handleTextInput :: T.Text -> Universe -> Universe
handleTextInput text u =
u
--handleTextInput text = input . textInput . textInputText %~ T.append (T.toUpper text)
handleTextInput text u = u
& uvScreenLayers . ix 0 . scInput %~ updateText
& updateTerminalText
where
@@ -152,8 +148,6 @@ spaceAction w = case w ^?! cWorld . lWorld . hud . hudElement of
--theLoc = doWorldPos (fst (_seenLocations (_cWorld w) IM.! _selLocation (_cWorld w))) w
theLoc = doWorldPos (w ^?! cWorld . lWorld . seenLocations . ix (w ^. cWorld . lWorld . selLocation) . _1) w
-- updateTopCloseObject i w' = w' & closeObjects %~ ( Right (_buttons w' IM.! i) : ) . tail
pauseGame :: Universe -> Universe
pauseGame = uvScreenLayers .~ [pauseMenu]