This commit is contained in:
2022-06-02 10:31:22 +01:00
parent e112006b46
commit c4fc044845
7 changed files with 37 additions and 37 deletions
+4 -2
View File
@@ -25,8 +25,10 @@ import SDL
--import Data.Text (unpack)
import qualified Data.Text as T
-- annoyingly, the text input event doesn't register backspace, so this has to be
-- dealt with elsewhere
-- annoyingly, the text input event doesn't register backspace, so deletion has to be
-- dealt with using key presses (handlePressedKey)
-- also, note that this currently "doubles" the inputs to both terminals if both
-- are open
handleTextInput :: T.Text -> Universe -> IO (Maybe Universe)
handleTextInput text = return . Just . (menuLayers . ix 0 . scInput %~ updateText)
. (uvWorld . hud . hudElement . subInventory . termParams . termInput . _Just %~ updateText)