Work out screen coordinates for connecting infobox

This commit is contained in:
2022-04-10 11:32:05 +01:00
parent 77c3f83d20
commit 0cc12f31ad
9 changed files with 41 additions and 43 deletions
+2 -2
View File
@@ -75,7 +75,7 @@ targetCursor = defaultTargeting
targetSimpleDraw :: Int -> Item -> Creature -> World -> Picture
targetSimpleDraw _ it _ w = fromMaybe mempty $ do
mwp <- it ^? itTargeting . tgPos . _Just
return $ setLayer TopLayer $ color red $ setDepth 50 $ uncurryV translate mwp
return $ setLayer DebugLayer $ color red $ setDepth 50 $ uncurryV translate mwp
$ rotate (_cameraRot w)
$ pictures
[line [V2 x x, V2 (-x) (-x)]
@@ -87,7 +87,7 @@ targetSimpleDraw _ it _ w = fromMaybe mempty $ do
targetRBCreatureDraw :: Int -> Item -> Creature -> World -> Picture
targetRBCreatureDraw _ it _ w = fromMaybe mempty $ do
mwp <- it ^? itTargeting . tgPos . _Just
return $ setLayer TopLayer $ color thecolor $ setDepth 50 $ uncurryV translate mwp
return $ setLayer DebugLayer $ color thecolor $ setDepth 50 $ uncurryV translate mwp
$ rotate (_cameraRot w)
$ pictures
[line [V2 x x, V2 (-x) (-x)]