Allow dropping items by dragging off inventory

This commit is contained in:
2024-11-19 22:24:03 +00:00
parent 13339c9a12
commit 2dc5d35744
11 changed files with 145 additions and 123 deletions
+1 -4
View File
@@ -66,10 +66,6 @@ drawInventory sss w cfig =
<> drawRootCursor w sss (w ^? hud . hudElement . diSelection . _Just) ldp cfig
<> iextra
<> drawMouseOver cfig w
-- <> translateScreenPos
-- cfig
-- (ldp ^. ldpPos)
-- (drawDISelections w)
where
ldp = invDisplayParams w
curs = invCursorParams w
@@ -110,6 +106,7 @@ getRootItemBounds i inv = do
y <- locLeftmost root ^? locLDT . ldtValue . cItem . itLocation . ilInvID
return (x, y)
-- this should display while dragging a single inv item
drawMouseOver :: Configuration -> World -> Picture
drawMouseOver cfig w = concat (invsel <|> combinvsel
<|> drawDragSelect cfig w)