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 -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