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
-1
View File
@@ -29,7 +29,6 @@ defaultLDP = LDP
}
invDP :: LDParams
--invDP = defaultLDP & ldpPos . spPixelOff .~ V2 6 0
invDP = defaultLDP & ldpPos . spPixelOff .~ V2 16 (-20)
invCursorParams :: World -> CursorDisplay
+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
+5 -6
View File
@@ -14,7 +14,7 @@ import Dodge.ScreenPos
import Dodge.SelectionSections
import Picture.Base
drawSelectionSections :: IM.IntMap (SelSection a) -> LDParams -> Config -> Picture
drawSelectionSections :: IMSS a -> LDParams -> Config -> Picture
drawSelectionSections sss ldp cfig =
translateScreenPos cfig (ldp ^. ldpPos) $
drawListYgapScaleYoff
@@ -29,14 +29,13 @@ drawSelectionSections sss ldp cfig =
sss
)
drawSSCursor ::
IM.IntMap (SelSection a) -> LDParams -> CursorDisplay -> Config -> Selection -> Picture
drawSSCursor
:: IMSS a -> LDParams -> CursorDisplay -> Config -> Selection -> Picture
drawSSCursor sss ldp curs cfig =
translateScreenPos cfig (ldp ^. ldpPos) .
selSecDrawCursor ldp curs sss
translateScreenPos cfig (ldp ^. ldpPos) . selSecDrawCursor ldp curs sss
drawSSMultiCursor ::
IM.IntMap (SelSection a) ->
IMSS a ->
Maybe (Int, Int) ->
Maybe Int ->
LDParams ->