Inventory: allow selection and dropping by dragging while filtering

This commit is contained in:
2024-11-20 19:58:24 +00:00
parent b750fe4186
commit efef41c9e1
5 changed files with 13 additions and 18 deletions
+2 -13
View File
@@ -341,22 +341,11 @@ combineInventoryExtra ::
Picture
combineInventoryExtra sss msel cfig w = fromMaybe mempty $ do
(i, j) <- msel
cpos <- selSecYint i j sss
si <- sss ^? ix i . ssItems . ix j
let col = _siColor si
mconcat
[ do
strs <- si ^? siPayload . ciInfo
return
. translate 160 0
-- it would be better to get the width of the selection list from elsewhere
. translateScreenPos cfig (secondColumnParams ^. ldpPos)
$ drawListYoff cpos $ map (color red . text) strs
, do
lnks <- si ^? siPayload . ciInvIDs
return (lnkMidPosInvSelsCol cfig w j col lnks)
lnks <- si ^? siPayload . ciInvIDs
return (lnkMidPosInvSelsCol cfig w j col lnks)
<> foldMap invcursor lnks
]
where
invcursor i = do
sss' <- w ^? hud . hudElement . diSections