Commit before restricting menu options
This commit is contained in:
@@ -74,11 +74,6 @@ handlePressedKey _ scode u = case scode of
|
||||
_ -> return $ Just u
|
||||
_ -> handlePressedKeyInMenu (head $ _uvScreenLayers u) scode u
|
||||
|
||||
--doBackspace :: T.Text -> T.Text
|
||||
--doBackspace t = case T.unsnoc t of
|
||||
-- Nothing -> t
|
||||
-- Just (t', _) -> t'
|
||||
|
||||
handlePressedKeyTerminal :: Int -> Scancode -> World -> World
|
||||
handlePressedKeyTerminal tmid scode w = case scode of
|
||||
ScancodeEscape -> w & cWorld . lWorld . terminals . ix tmid . tmInput . tiFocus %~ const False
|
||||
|
||||
@@ -4,10 +4,7 @@ module Dodge.Event.Menu (
|
||||
|
||||
import Control.Lens
|
||||
import Data.Maybe
|
||||
import qualified Data.Text as T
|
||||
import Dodge.Data.Universe
|
||||
import Dodge.Debug.Terminal
|
||||
import Dodge.Menu.PushPop
|
||||
import Dodge.WindowLayout
|
||||
import SDL
|
||||
|
||||
@@ -16,13 +13,8 @@ handlePressedKeyInMenu mState scode = case mState of
|
||||
OptionScreen{_scOptions = mos, _scDefaultEff = defeff} ->
|
||||
optionListToEffects defeff scode mos
|
||||
--DisplayScreen{} -> popScreen
|
||||
ColumnsScreen{} -> popScreen
|
||||
-- WaitScreen{} -> return . Just
|
||||
InputScreen s help -> case scode of
|
||||
ScancodeEscape -> popScreen
|
||||
ScancodeReturn -> popScreen . applyTerminalString (words $ T.unpack s)
|
||||
ScancodeTab -> autoCompleteTerminal (T.unpack s) help
|
||||
_ -> return . Just
|
||||
_ -> return . Just
|
||||
|
||||
optionListToEffects ::
|
||||
(Universe -> IO (Maybe Universe)) ->
|
||||
|
||||
Reference in New Issue
Block a user