Simplify the main loop, events only perform functional update
This commit is contained in:
@@ -6,7 +6,6 @@ import qualified Data.Text as T
|
||||
import Dodge.Base
|
||||
import Dodge.Combine
|
||||
import Dodge.Data.Universe
|
||||
import Dodge.Event.Keyboard
|
||||
import Dodge.HeldScroll
|
||||
import Dodge.InputFocus
|
||||
import Dodge.Inventory
|
||||
@@ -75,6 +74,11 @@ updateWheelEvent yi w = case w ^. cWorld . lWorld . hud . hudElement of
|
||||
lbDown = ButtonLeft `M.member` _mouseButtons (_input w)
|
||||
invKeyDown = ScancodeCapsLock `M.member` _pressedKeys (_input w)
|
||||
|
||||
guardDisconnectedID :: Int -> World -> World -> World
|
||||
guardDisconnectedID tmid w w' = case w ^? cWorld . lWorld . terminals . ix tmid . tmStatus of
|
||||
Just TerminalReady -> w'
|
||||
_ -> w
|
||||
|
||||
scrollRBOption :: Float -> World -> World
|
||||
scrollRBOption y w
|
||||
| y < 0 = w & rbOptions . opSel %~ (min (length (_opEquip (_rbOptions w)) -1) . (+ 1))
|
||||
|
||||
Reference in New Issue
Block a user