Tweak debug display

This commit is contained in:
2025-10-14 10:14:30 +01:00
parent 3d602b4f57
commit cadaf00797
7 changed files with 150 additions and 143 deletions
+11 -8
View File
@@ -2,8 +2,8 @@
module Dodge.Render.Picture (fixedCoordPictures) where
import Linear (_xy)
import Control.Lens
import qualified Data.Map.Strict as M
import Data.Maybe
import Dodge.Base.Coordinate
import Dodge.Base.Window
@@ -13,6 +13,7 @@ import Dodge.Render.List
import Dodge.Render.MenuScreen
import Geometry
import HelpNum
import Linear (_xy)
import Picture
fixedCoordPictures :: Universe -> Picture
@@ -30,18 +31,20 @@ fixedCoordPictures u =
)
<> displayFrameTicks u
<> drawMouseCursor u
<> ( toTopLeft cfig . translate (1.3 * halfWidth cfig) 0
. drawList
. take 50
. drop (u ^. uvDebugMessageOffset)
. map text
$ foldMap _debugMessage (_uvDebug u) -- other debug pics in extraPics
)
<> toTopLeft
cfig
( translate (halfWidth cfig) (10 * fromIntegral (u ^. uvDebugMessageOffset))
. drawLabelledList
. fmap f
. M.toList
$ u ^. uvDebug
)
where
cfig = _uvConfig u
hw = halfWidth cfig
hh = halfHeight cfig
ttl = toTopLeft cfig
f (k, l) = (show k, foldMap _debugMessage l)
displayFrameTicks :: Universe -> Picture
displayFrameTicks u