Tweak drawRBOptions, still not completely correct

This commit is contained in:
2025-12-24 20:54:36 +00:00
parent faa40bdd9f
commit 225ee310ad
3 changed files with 14 additions and 14 deletions
+9 -7
View File
@@ -79,8 +79,8 @@ drawInventory sss w cfig = \case
Just (_ : _) -> Nothing
_ -> return . drawItemConnections sss cfig $ invAdj inv
drawRootCursor ::
World -> IMSS () -> Maybe Selection -> LDParams -> Config -> Picture
drawRootCursor
:: World -> IMSS () -> Maybe Selection -> LDParams -> Config -> Picture
drawRootCursor w sss msel ldp cfig = fromMaybe mempty $ do
cr <- w ^? cWorld . lWorld . creatures . ix 0
guard $ crIsAiming cr
@@ -268,11 +268,13 @@ drawRBOptions cfig w = fold $ do
"REMOVES " ++ otheritem rid
_ -> ""
return $
toTopLeft cfig $
translate 290 (-1) (ytext midstr)
--toTopLeft cfig $
translateScreenPos cfig (invDP ^. ldpPos) $
--translate 290 (-1) (ytext midstr)
translate 290 0 (ytext midstr)
<> translate
160
(-1)
0
( listCursorChooseBorderScale
0
1
@@ -285,7 +287,7 @@ drawRBOptions cfig w = fold $ do
)
<> translate
380
(-1)
0
( drawListYoff (curpos - i) (map (text . eqPosText) eslist)
<> listCursorChooseBorderScale 0 1 (bc East) (curpos - i) 0 white 7 (length eslist)
<> listCursorChooseBorderScale 0 1 (bc West) (curpos + 1) 0 white 7 (length eslist - (i + 1))
@@ -293,7 +295,7 @@ drawRBOptions cfig w = fold $ do
<> maybetopborder i curpos
<> maybebottomborder i (length eslist) curpos
)
<> translate 460 (-1) (ytext extrastr)
<> translate 460 0 (ytext extrastr)
where
bc x = BoundaryCursor [x]
maybetopborder 0 curpos = listCursorChooseBorderScale 0 1 (bc North) curpos 0 white 7 1