Cleanup
This commit is contained in:
@@ -210,17 +210,16 @@ updateMouseClickInGame cfig w = case w ^. input . mouseContext of
|
||||
f (x,y) = (x,y,mempty)
|
||||
|
||||
startDrag :: (Int, Int) -> Configuration -> World -> World
|
||||
startDrag (a, b) cfig w = setcontext . fromMaybe (augInvDirectSelect (a, b, IS.singleton b) w) $ do
|
||||
(i, _, xs) <- w ^? hud . hudElement . diSelection . _Just
|
||||
guard $ i == a && b `IS.member` xs
|
||||
return w
|
||||
startDrag (a, b) cfig w = setcontext
|
||||
. fromMaybe (augInvDirectSelect (a, b, IS.singleton b) w) $ do
|
||||
(i, _, xs) <- w ^? hud . hudElement . diSelection . _Just
|
||||
guard $ i == a && b `IS.member` xs
|
||||
return w
|
||||
where
|
||||
setcontext = (input . mouseContext .~ OverInvDrag a (Just (a, b)) above bneath)
|
||||
above :: Maybe (Int,Int)
|
||||
setcontext = input . mouseContext .~ OverInvDrag a (Just (a, b)) above bneath
|
||||
above = do
|
||||
sss <- w ^? hud . hudElement . diSections
|
||||
inverseSelSecYint (yint - 1) sss
|
||||
bneath :: Maybe (Int,Int)
|
||||
bneath = do
|
||||
sss <- w ^? hud . hudElement . diSections
|
||||
inverseSelSecYint (yint + 1) sss
|
||||
|
||||
Reference in New Issue
Block a user