Partial fix on selecting unselectable items using mouse

This commit is contained in:
2024-11-25 22:21:36 +00:00
parent bf6e02bd98
commit 9da80a0429
+5 -2
View File
@@ -332,11 +332,14 @@ updateMouseContextGame cfig u = case u ^. uvWorld . input . mouseContext of
return $ OverInvDrag i' (Just (i, j)) above bneath
overinv = do
sss <- w ^? hud . hudElement . diSections
selpos <- inverseSelNumPos cfig (invDisplayParams w) sss mpos
selpos@(i,j) <- inverseSelNumPos cfig (invDisplayParams w) sss mpos
case w ^? hud . hudElement . subInventory . ciSelection of
Just _ -> return $ OverInvFilt selpos
Just _ -> do
guard (i == 0)
return $ OverInvFilt selpos
_ -> do
guard $ ButtonRight `M.notMember` (w ^. input . mouseButtons)
guard =<< sss ^? ix i . ssItems . ix j . siIsSelectable
return $ OverInvSelect selpos
overcomb = do
sss <- w ^? hud . hudElement . subInventory . ciSections