Continue hud/mouse refactor
This commit is contained in:
+8
-11
@@ -301,9 +301,9 @@ checkTermDist w = fromMaybe w $ do
|
||||
w & hud . hudElement . subInventory
|
||||
.~ NoSubInventory MouseInvNothing
|
||||
|
||||
-- for other mouse effects, see yourControl
|
||||
updateMouseInventoryEffects :: Configuration -> World -> World
|
||||
updateMouseInventoryEffects cfig w = w
|
||||
---- for other mouse effects, see yourControl
|
||||
--updateMouseInventoryEffects :: Configuration -> World -> World
|
||||
--updateMouseInventoryEffects cfig w = w
|
||||
|
||||
updateMouseInventorySelection :: Configuration -> World -> World
|
||||
updateMouseInventorySelection cfig w = fromMaybe w $ do
|
||||
@@ -407,14 +407,11 @@ updateMouseContext cfig w =
|
||||
sss <- w ^? hud . hudElement . subInventory . ciSections
|
||||
msel <- w ^? hud . hudElement . subInventory . ciSelection . _Just
|
||||
let mpossel = inverseSelNumPos cfig secondColumnParams sss (w ^. input . mousePos)
|
||||
case mpossel of
|
||||
Nothing -> usecsel msel
|
||||
Just (-1,_) -> return OverCombFilter
|
||||
Just x | x == msel -> return $ OverCombCombine x
|
||||
Just x -> return $ OverCombSelect x
|
||||
-- fmap OverCombCombine $ inverseSelNumPos cfig secondColumnParams sss (w ^. input . mousePos)
|
||||
usecsel (-1,_) = return OverCombFilter
|
||||
usecsel x = return $ OverCombCombine x
|
||||
return $ case mpossel of
|
||||
Nothing -> OverCombEscape
|
||||
Just (-1,_) -> OverCombFilter
|
||||
Just x | x == msel -> OverCombCombine x
|
||||
Just x -> OverCombSelect x
|
||||
overterm = do
|
||||
tmid <- w ^? hud . hudElement . subInventory . termID
|
||||
guard True
|
||||
|
||||
Reference in New Issue
Block a user