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
+10 -10
View File
@@ -16,7 +16,7 @@ import Dodge.Path
import Dodge.Picture.SizeInvariant
--import Dodge.Render.InfoBox
import Dodge.Render.Label
import Dodge.Render.List
--import Dodge.Render.List
import Dodge.ShortShow
import Dodge.SoundLogic.LoadSound
import Dodge.Viewpoints
@@ -153,15 +153,15 @@ drawZoneCol col s (V2 x y) = setLayer DebugLayer . color col $ thickLine 2 (p :
zipWith (+.+) (square 1) $
map ((s *.*) . (each %~ fromIntegral)) [V2 x y, V2 (x + 1) y, V2 (x + 1) (y + 1), V2 x (y + 1)]
showEnabledDebugs :: Config -> Picture
{-# INLINE showEnabledDebugs #-}
showEnabledDebugs cfig
| Enable_debug `S.member` _debug_booleans cfig =
setLayer FixedCoordLayer (toTopLeft cfig (translate (0.5 * halfWidth cfig) 0 $ drawList $ map text ts))
| otherwise = mempty
where
-- pic = foldMap (debugDraw' cfig w) (_debug_booleans cfig)
ts = map show (S.toList $ _debug_booleans cfig)
--showEnabledDebugs :: Config -> Picture
--{-# INLINE showEnabledDebugs #-}
--showEnabledDebugs cfig
-- | Enable_debug `S.member` _debug_booleans cfig =
-- setLayer FixedCoordLayer (toTopLeft cfig (translate (0.5 * halfWidth cfig) 0 $ drawList $ map text ts))
-- | otherwise = mempty
-- where
-- -- pic = foldMap (debugDraw' cfig w) (_debug_booleans cfig)
-- ts = map show (S.toList $ _debug_booleans cfig)
--debugDraw' :: Config -> World -> DebugBool -> Picture
--{-# INLINE debugDraw' #-}