Continue shuffle
This commit is contained in:
+15
-12
@@ -1,9 +1,4 @@
|
|||||||
module Dodge.Update.Input (
|
module Dodge.Update.Input (
|
||||||
updateKeyInGame,
|
|
||||||
updateKeysInTerminal,
|
|
||||||
doInputScreenInput,
|
|
||||||
doSubInvRegexInput,
|
|
||||||
doRegexInput,
|
|
||||||
updateUseInput,
|
updateUseInput,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
@@ -37,14 +32,22 @@ import SDL
|
|||||||
|
|
||||||
updateUseInput :: Universe -> Universe
|
updateUseInput :: Universe -> Universe
|
||||||
updateUseInput u = case u ^? uvScreenLayers . _head of
|
updateUseInput u = case u ^? uvScreenLayers . _head of
|
||||||
Just (InputScreen thetext _) -> doInputScreenInput thetext u
|
Just sl -> updateUseInputOnScreen sl u
|
||||||
Just screen@OptionScreen{_scPositionedMenuOption = mop, _scOptionFlag = flag, _scSelectionList = sellist, _scListDisplayParams = ldps} ->
|
Nothing -> updateUseInputInGame (u ^. uvWorld . hud . hudElement) u
|
||||||
optionScreenUpdate screen mop flag ldps sellist u
|
|
||||||
_ -> case u ^? uvWorld . hud . hudElement . subInventory of
|
updateUseInputOnScreen :: ScreenLayer -> Universe -> Universe
|
||||||
Just (DisplayTerminal tmid) | inTermFocus (_uvWorld u) -> updateKeysInTerminal tmid u
|
updateUseInputOnScreen sl = case sl of
|
||||||
Just (CombineInventory _ _ _)
|
InputScreen thetext _-> doInputScreenInput thetext
|
||||||
|
screen@OptionScreen{_scPositionedMenuOption = mop, _scOptionFlag = flag, _scSelectionList = sellist, _scListDisplayParams = ldps} ->
|
||||||
|
optionScreenUpdate screen mop flag ldps sellist
|
||||||
|
|
||||||
|
updateUseInputInGame :: HUDElement -> Universe -> Universe
|
||||||
|
updateUseInputInGame h u = case h of
|
||||||
|
DisplayCarte -> u
|
||||||
|
DisplayInventory si _ -> case si of
|
||||||
|
DisplayTerminal tmid | inTermFocus (_uvWorld u) -> updateKeysInTerminal tmid u
|
||||||
|
CombineInventory _ _ _
|
||||||
| inSubInvRegex (u ^. uvWorld) -> doSubInvRegexInput u
|
| inSubInvRegex (u ^. uvWorld) -> doSubInvRegexInput u
|
||||||
-- _ | inInvRegex (u ^. uvWorld) -> doInvRegexInput u
|
|
||||||
_ | inInvRegex (u ^. uvWorld) -> doRegexInput (-1) invRegex invRegex u
|
_ | inInvRegex (u ^. uvWorld) -> doRegexInput (-1) invRegex invRegex u
|
||||||
_ | inCloseRegex (u ^. uvWorld) -> doRegexInput 2 closeRegex closeRegex u
|
_ | inCloseRegex (u ^. uvWorld) -> doRegexInput 2 closeRegex closeRegex u
|
||||||
_ -> M.foldlWithKey' updateKeyInGame u pkeys
|
_ -> M.foldlWithKey' updateKeyInGame u pkeys
|
||||||
|
|||||||
Reference in New Issue
Block a user