Commit before removing "above/below" checks on inventory dragging
I don't think these actually do anything EDIT: they are actually necessary
This commit is contained in:
+3
-9
@@ -346,7 +346,7 @@ updateMouseContext cfig u = case u ^? uvScreenLayers . ix 0 of
|
||||
|
||||
updateMouseContextGame :: Configuration -> Universe -> Universe
|
||||
updateMouseContextGame cfig u = case u ^. uvWorld . input . mouseContext of
|
||||
OverInvDrag i _ _ _ -> u & uvWorld . input . mouseContext .~ invdrag i
|
||||
OverInvDrag i _ -> u & uvWorld . input . mouseContext .~ invdrag i
|
||||
OverInvDragSelect{} -> u
|
||||
_ ->
|
||||
u & uvWorld . input . mouseContext
|
||||
@@ -359,19 +359,13 @@ updateMouseContextGame cfig u = case u ^. uvWorld . input . mouseContext of
|
||||
guard $ t1 > t2
|
||||
return MouseGameRotate
|
||||
aimcontext
|
||||
-- | Just t1 <- w ^. input . mouseButtons . at ButtonLeft
|
||||
-- , Just t2 <- w ^. input . mouseButtons . at ButtonRight
|
||||
-- , t1 > t2 = MouseGameRotate
|
||||
| ButtonRight `M.member` (w ^. input . mouseButtons) = MouseAiming
|
||||
| otherwise = MouseInGame
|
||||
mpos = w ^. input . mousePos
|
||||
invdrag i' = fromMaybe (OverInvDrag i' Nothing Nothing Nothing) $ do
|
||||
invdrag i' = fromMaybe (OverInvDrag i' Nothing) $ do
|
||||
sss <- w ^? hud . hudElement . diSections
|
||||
let yint = posSelSecYint cfig invDP (mpos ^. _y)
|
||||
(i, j) <- inverseSelNumPos cfig invDP sss mpos
|
||||
let above = inverseSelSecYint (yint - 1) sss
|
||||
bneath = inverseSelSecYint (yint + 1) sss
|
||||
return $ OverInvDrag i' (Just (i, j)) above bneath
|
||||
return $ OverInvDrag i' (Just (i, j))
|
||||
overinv = do
|
||||
sss <- w ^? hud . hudElement . diSections
|
||||
selpos@(i, j) <- inverseSelNumPos cfig invDP sss mpos
|
||||
|
||||
Reference in New Issue
Block a user