Allow for more changable terminal screen colors
This commit is contained in:
+10
-5
@@ -73,6 +73,7 @@ updateUniverse u =
|
||||
updateUniverseLast
|
||||
. updateUniverseMid
|
||||
. debugEvents
|
||||
. updateMouseContext cfig
|
||||
. over uvWorld (updateCamera cfig)
|
||||
. updateUniverseFirst
|
||||
$ u
|
||||
@@ -285,7 +286,7 @@ functionalUpdate u =
|
||||
. over uvWorld updateCloseObjects
|
||||
. over uvWorld updateWheelEvents
|
||||
. over uvWorld (updateMouseInventorySelection (u ^. uvConfig))
|
||||
. over uvWorld (updateMouseContext (u ^. uvConfig))
|
||||
-- . updateMouseContext (u ^. uvConfig)
|
||||
. over uvWorld zoneClouds
|
||||
. over uvWorld zoneCreatures
|
||||
-- . over uvWorld updateInventorySelectionList
|
||||
@@ -388,13 +389,17 @@ shiftInvItemsDown (_, i) x w = fromMaybe w $ do
|
||||
f w' i' = swapInvItems g i' w'
|
||||
g i' m = fst <$> IM.lookupGT i' m
|
||||
|
||||
updateMouseContext :: Configuration -> World -> World
|
||||
updateMouseContext cfig w =
|
||||
w & input . mouseContext
|
||||
updateMouseContext :: Configuration -> Universe -> Universe
|
||||
updateMouseContext cfig u =
|
||||
u & uvWorld . input . mouseContext
|
||||
.~ fromMaybe
|
||||
aimcontext
|
||||
(overinv <|> overcomb <|> overterm)
|
||||
(overmenu <|> overinv <|> overcomb <|> overterm)
|
||||
where
|
||||
overmenu = do
|
||||
screenlayer <- u ^? uvScreenLayers . ix 0
|
||||
return MouseMenuClick
|
||||
w = u ^. uvWorld
|
||||
aimcontext
|
||||
| ButtonRight `M.member` (w ^. input . mouseButtons) = MouseAiming
|
||||
| otherwise = NoMouseContext
|
||||
|
||||
Reference in New Issue
Block a user