Tweak drawRBOptions, still not completely correct
This commit is contained in:
@@ -29,7 +29,6 @@ defaultLDP = LDP
|
|||||||
}
|
}
|
||||||
|
|
||||||
invDP :: LDParams
|
invDP :: LDParams
|
||||||
--invDP = defaultLDP & ldpPos . spPixelOff .~ V2 6 0
|
|
||||||
invDP = defaultLDP & ldpPos . spPixelOff .~ V2 16 (-20)
|
invDP = defaultLDP & ldpPos . spPixelOff .~ V2 16 (-20)
|
||||||
|
|
||||||
invCursorParams :: World -> CursorDisplay
|
invCursorParams :: World -> CursorDisplay
|
||||||
|
|||||||
@@ -79,8 +79,8 @@ drawInventory sss w cfig = \case
|
|||||||
Just (_ : _) -> Nothing
|
Just (_ : _) -> Nothing
|
||||||
_ -> return . drawItemConnections sss cfig $ invAdj inv
|
_ -> return . drawItemConnections sss cfig $ invAdj inv
|
||||||
|
|
||||||
drawRootCursor ::
|
drawRootCursor
|
||||||
World -> IMSS () -> Maybe Selection -> LDParams -> Config -> Picture
|
:: World -> IMSS () -> Maybe Selection -> LDParams -> Config -> Picture
|
||||||
drawRootCursor w sss msel ldp cfig = fromMaybe mempty $ do
|
drawRootCursor w sss msel ldp cfig = fromMaybe mempty $ do
|
||||||
cr <- w ^? cWorld . lWorld . creatures . ix 0
|
cr <- w ^? cWorld . lWorld . creatures . ix 0
|
||||||
guard $ crIsAiming cr
|
guard $ crIsAiming cr
|
||||||
@@ -268,11 +268,13 @@ drawRBOptions cfig w = fold $ do
|
|||||||
"REMOVES " ++ otheritem rid
|
"REMOVES " ++ otheritem rid
|
||||||
_ -> ""
|
_ -> ""
|
||||||
return $
|
return $
|
||||||
toTopLeft cfig $
|
--toTopLeft cfig $
|
||||||
translate 290 (-1) (ytext midstr)
|
translateScreenPos cfig (invDP ^. ldpPos) $
|
||||||
|
--translate 290 (-1) (ytext midstr)
|
||||||
|
translate 290 0 (ytext midstr)
|
||||||
<> translate
|
<> translate
|
||||||
160
|
160
|
||||||
(-1)
|
0
|
||||||
( listCursorChooseBorderScale
|
( listCursorChooseBorderScale
|
||||||
0
|
0
|
||||||
1
|
1
|
||||||
@@ -285,7 +287,7 @@ drawRBOptions cfig w = fold $ do
|
|||||||
)
|
)
|
||||||
<> translate
|
<> translate
|
||||||
380
|
380
|
||||||
(-1)
|
0
|
||||||
( drawListYoff (curpos - i) (map (text . eqPosText) eslist)
|
( drawListYoff (curpos - i) (map (text . eqPosText) eslist)
|
||||||
<> listCursorChooseBorderScale 0 1 (bc East) (curpos - i) 0 white 7 (length 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))
|
<> 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
|
<> maybetopborder i curpos
|
||||||
<> maybebottomborder i (length eslist) curpos
|
<> maybebottomborder i (length eslist) curpos
|
||||||
)
|
)
|
||||||
<> translate 460 (-1) (ytext extrastr)
|
<> translate 460 0 (ytext extrastr)
|
||||||
where
|
where
|
||||||
bc x = BoundaryCursor [x]
|
bc x = BoundaryCursor [x]
|
||||||
maybetopborder 0 curpos = listCursorChooseBorderScale 0 1 (bc North) curpos 0 white 7 1
|
maybetopborder 0 curpos = listCursorChooseBorderScale 0 1 (bc North) curpos 0 white 7 1
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import Dodge.ScreenPos
|
|||||||
import Dodge.SelectionSections
|
import Dodge.SelectionSections
|
||||||
import Picture.Base
|
import Picture.Base
|
||||||
|
|
||||||
drawSelectionSections :: IM.IntMap (SelSection a) -> LDParams -> Config -> Picture
|
drawSelectionSections :: IMSS a -> LDParams -> Config -> Picture
|
||||||
drawSelectionSections sss ldp cfig =
|
drawSelectionSections sss ldp cfig =
|
||||||
translateScreenPos cfig (ldp ^. ldpPos) $
|
translateScreenPos cfig (ldp ^. ldpPos) $
|
||||||
drawListYgapScaleYoff
|
drawListYgapScaleYoff
|
||||||
@@ -29,14 +29,13 @@ drawSelectionSections sss ldp cfig =
|
|||||||
sss
|
sss
|
||||||
)
|
)
|
||||||
|
|
||||||
drawSSCursor ::
|
drawSSCursor
|
||||||
IM.IntMap (SelSection a) -> LDParams -> CursorDisplay -> Config -> Selection -> Picture
|
:: IMSS a -> LDParams -> CursorDisplay -> Config -> Selection -> Picture
|
||||||
drawSSCursor sss ldp curs cfig =
|
drawSSCursor sss ldp curs cfig =
|
||||||
translateScreenPos cfig (ldp ^. ldpPos) .
|
translateScreenPos cfig (ldp ^. ldpPos) . selSecDrawCursor ldp curs sss
|
||||||
selSecDrawCursor ldp curs sss
|
|
||||||
|
|
||||||
drawSSMultiCursor ::
|
drawSSMultiCursor ::
|
||||||
IM.IntMap (SelSection a) ->
|
IMSS a ->
|
||||||
Maybe (Int, Int) ->
|
Maybe (Int, Int) ->
|
||||||
Maybe Int ->
|
Maybe Int ->
|
||||||
LDParams ->
|
LDParams ->
|
||||||
|
|||||||
Reference in New Issue
Block a user