Broken commit

This commit is contained in:
2023-12-23 15:14:02 +00:00
parent f26d380c1b
commit 210787d2dc
15 changed files with 107 additions and 38 deletions
+11
View File
@@ -50,6 +50,7 @@ makeSelectionListPictures :: SelectionList a -> [Picture]
makeSelectionListPictures = concatMap f . getShownItems
where
f si = map (color (_siColor si) . text) $ _siPictures si
--f si = map ((flip inverseText) ((_siColor si))) $ _siPictures si
drawCursorAt :: Maybe Int -> [SelectionItem a] -> ListDisplayParams -> Picture
drawCursorAt mi lis ldps = fromMaybe mempty $ do
@@ -159,6 +160,16 @@ drawListElement ygap s xint yint =
renderListAt :: Float -> Float -> [(String, Color)] -> Picture
renderListAt tx ty = translate tx (- ty) . drawList . map (\(str, col) -> color col $ text str)
--inverseText :: String -> Color -> Picture
--inverseText str col =
-- translate3 (V3 0 0 (0.5))
-- (color (V4 0 1 0 0.1) ( text str))
-- <>
-- translate3 (V3 0 0 (0.4))
-- (color col (polygon [0,V2 l 0, V2 l 200, V2 0 200]))
-- where
-- l = 100 * fromIntegral (length str)
-- given a list of pictures that are each the size of a "text" call, displays them as
-- a list on the screen
drawList :: [Picture] -> Picture