Record mouse over combination selections
This commit is contained in:
+13
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user