Remove possiblity of displayed but non-focussed terminal

This commit is contained in:
2024-11-16 20:25:49 +00:00
parent 86f185c71e
commit a0431ff9a3
11 changed files with 16 additions and 39 deletions
+2 -5
View File
@@ -36,12 +36,9 @@ updateUseInputInGame u = updateFunctionKeys $ case u ^. uvWorld . hud . hudEleme
DisplayCarte -> over uvWorld updatePressedButtonsCarte u
DisplayInventory{_subInventory = si} -> case si of
DisplayTerminal tmid
| lbinitialpress && inTermFocus w -> u & uvWorld
| lbinitialpress -> u & uvWorld
%~ doTerminalEffectLB (w ^?! cWorld . lWorld . terminals . ix tmid)
| inTermFocus (_uvWorld u) -> updateKeysInTerminal tmid u
| lbinitialpress ->
u & uvWorld . cWorld . lWorld . terminals . ix tmid . tmInput . tiFocus
%~ const True
| otherwise -> updateKeysInTerminal tmid u
CombineInventory{_ciSections = sss, _ciSelection = msel}
| lbinitialpress -> u & uvWorld %~ updateCombineInvClick sss
| inSubInvRegex (u ^. uvWorld) ->
+2 -4
View File
@@ -7,7 +7,6 @@ import Data.Maybe
import Dodge.Base
import Dodge.Data.Universe
--import Dodge.HeldScroll
import Dodge.InputFocus
import Dodge.Inventory
import Dodge.SelectionSections
--import Dodge.SoundLogic
@@ -78,15 +77,14 @@ guardDisconnectedID tmid w w' = case w ^? cWorld . lWorld . terminals . ix tmid
terminalWheelEvent :: Int -> Int -> World -> World
terminalWheelEvent yi tmid w
| rbDown && inTermFocus w =
| rbDown =
guardDisconnectedID tmid w $
w
& cWorld . lWorld . terminals . ix tmid %~ updatetermsubsel
| inTermFocus w =
| otherwise =
guardDisconnectedID tmid w $
w
& cWorld . lWorld . terminals . ix tmid %~ updatetermsel
| otherwise = w
where
rbDown = ButtonRight `M.member` _mouseButtons (_input w)
updatetermsel tm = case tm ^? tmInput . tiSel of