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
+6 -7
View File
@@ -13,7 +13,7 @@ module Dodge.Creature.Picture
import Dodge.Data
--import Dodge.Base
import Dodge.Creature.Test
--import Dodge.Render.InfoBox
import Dodge.Render.InfoBox
import Dodge.Render.List
--import Dodge.Creature.AlertLevel.Data
--import Dodge.Picture.Layer
@@ -87,17 +87,16 @@ crDisplayInfo cfig w cr = (_crPos cr,
crOnScreen = pointOnScreen cfig w $ _crPos cr
creatureDisplayText :: Configuration -> World -> Creature -> Picture
creatureDisplayText cfig w cr = setLayer FixedCoordLayer . setDepth 50
$ color white $ renderListAt 0 0 cfig $ zip ["TEST","ME"] $ repeat white
-- $ renderInfoListAt 0 0 cfig w
-- $ crDisplayInfo cfig w cr
creatureDisplayText cfig w cr
= setLayer FixedCoordLayer $ renderInfoListAt 0 0 cfig w
$ crDisplayInfo cfig w cr
creatureDisplayText' :: Configuration -> World -> Creature -> Picture
creatureDisplayText' cfig w cr
| not (_debug_cr_status cfig) = []
| otherwise
= setLayer TopLayer
. setDepth 50
= setLayer DebugLayer
. setDepth 20
. translate x y
. color white
. rotate (0.5 * pi)