Tweak mouse context/cursors

This commit is contained in:
2024-11-15 22:53:33 +00:00
parent 4434093d81
commit 0621709f7b
7 changed files with 288 additions and 205 deletions
+5 -6
View File
@@ -117,7 +117,8 @@ drawMouseOver :: Configuration -> World -> Picture
drawMouseOver cfig w = fromMaybe mempty $ invsel <|> combinvsel
where
invsel = do
(j, i) <- w ^? input . mouseContext . mcoInv
(j, i) <- w ^? input . mouseContext . mcoInvSelect <|>
w ^? input . mouseContext . mcoInvFilt
sss <- w ^? hud . hudElement . diSections
let idp = invDisplayParams w
return . translateScreenPos cfig (invDisplayParams w ^. ldpPos)
@@ -125,7 +126,8 @@ drawMouseOver cfig w = fromMaybe mempty $ invsel <|> combinvsel
$ selSecDrawCursorAt 15 idp curs sss (j, i)
curs = BackdropCursor
combinvsel = do
(j, i) <- w ^? input . mouseContext . mcoCombInv
(j, i) <- (w ^? input . mouseContext . mcoCombSelect)
<|> (w ^? input . mouseContext . mcoCombCombine)
sss <- w ^? hud . hudElement . subInventory . ciSections
let idp = secondColumnParams
return . translateScreenPos cfig (idp ^. ldpPos)
@@ -179,9 +181,7 @@ drawExamineInventory cfig w =
secondColumnParams
cfig
( defaultSelectionList & slItems
.~ map -- tweakItems itm
-- ++
f
.~ map f
( makeParagraph 55 $
yourAugmentedItem
itemInfo
@@ -191,7 +191,6 @@ drawExamineInventory cfig w =
)
)
where
-- itm = yourSelectedItem w
f str =
SelectionItem
{ _siPictures = [str]