Record mouse over combination selections

This commit is contained in:
2024-11-04 00:40:24 +00:00
parent fafef1275b
commit c1b1611279
7 changed files with 175 additions and 144 deletions
+13 -1
View File
@@ -102,7 +102,6 @@ getRootItemBounds i inv = do
y <- locLeftmost root ^? locLDT . ldtValue . cItem . itLocation . ilInvID
return (x,y)
drawDIMouseOver :: World -> Picture
drawDIMouseOver w = fromMaybe mempty $ do
(j, i) <- w ^? hud . hudElement . diMouseOver . _Just
@@ -112,6 +111,15 @@ drawDIMouseOver w = fromMaybe mempty $ do
where
curs = BackdropCursor
drawCIMouseOver :: World -> Picture
drawCIMouseOver w = fromMaybe mempty $ do
(j, i) <- w ^? hud . hudElement . subInventory . ciMouseOver . _Just
sss <- w ^? hud . hudElement . subInventory . ciSections
let idp = invDisplayParams w
return . color (withAlpha 0.2 white) $ selSecDrawCursorAt 15 idp curs sss (j, i)
where
curs = BackdropCursor
getMouseInvSel :: World -> Maybe ((Int, Int), (Int, Int))
getMouseInvSel w = case w ^? hud . hudElement . subInventory . nsSelected of
Just (MouseInvSelect s (Just e)) -> Just (s, e)
@@ -147,6 +155,10 @@ drawCombineInventory cfig sss w =
<> drawSelectionSections sss secondColumnParams cfig
<> drawSSCursor sss msel secondColumnParams curs cfig
<> combineInventoryExtra sss msel cfig w
<> translateScreenPos
cfig
(secondColumnParams ^. ldpPos)
(drawCIMouseOver w)
where
curs = BoundaryCursor [North, South, West]
msel = w ^? hud . hudElement . subInventory . ciSelection . _Just