Tweak debug display
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user