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
+8
View File
@@ -16,6 +16,7 @@ module Dodge.Render.List (
selSecDrawCursorAt,
drawTitleBackground, -- should be renamed, made sensible
drawCursorAt,
drawLabelledList,
) where
import qualified Data.IntMap.Strict as IM
@@ -208,6 +209,13 @@ renderListAt tx ty = translate tx (- ty)
drawList :: [Picture] -> Picture
drawList = drawListYgapScaleYoff 0 1 0
drawLabelledList :: [(String,[String])] -> Picture
drawLabelledList ((s,ss):xs)
= translate (-10) 0 (drawListYgapScaleYoff 0 1 0 [ textJustifyRight s])
<> drawListYgapScaleYoff 0 1 0 (text <$> ss)
<> translate 0 (negate $ fromIntegral (max 1 $ length ss) * 20) (drawLabelledList xs)
drawLabelledList [] = mempty
--TODO put the following functions in an appropriate place
-- | Colour picture and add black drop shadow.