Start to generalise text input to "terminal signal" input
This commit is contained in:
@@ -3,6 +3,7 @@ module Dodge.Update.Input.Text (
|
||||
doTextInputOver',
|
||||
) where
|
||||
|
||||
import Data.Either
|
||||
import Data.Char
|
||||
import Dodge.Data.Universe
|
||||
import LensHelp
|
||||
@@ -13,7 +14,7 @@ doTextInputOver p u = doTextInputOver' u p u
|
||||
|
||||
doTextInputOver' :: Universe -> ASetter' a String -> a -> a
|
||||
doTextInputOver' u p x =
|
||||
x & p %~ (++ map toUpper str)
|
||||
x & p %~ (++ map toUpper (rights str))
|
||||
& checkBackspace
|
||||
where
|
||||
str = u ^. uvWorld . input . textInput
|
||||
|
||||
Reference in New Issue
Block a user