Implement combining of items

This commit is contained in:
2021-12-03 01:56:23 +00:00
parent 8b8d75b016
commit bebc73882a
13 changed files with 190 additions and 56 deletions
+2 -2
View File
@@ -35,14 +35,14 @@ listCursorAt xoff yoff cfig yint col cursxsize cursysize = winScale cfig
listTextPictureAt :: Float -> Float -> Configuration -> Int -> Picture -> Picture
listTextPictureAt xoff yoff cfig yint = winScale cfig
. translate (xoff + 15 - hw) (yoff + hh - (20 * (fromIntegral yint+1)))
. translate (xoff + 15 - hw) (negate yoff + hh - (20 * (fromIntegral yint+1)))
. scale 0.1 0.1
where
hw = halfWidth cfig
hh = halfHeight cfig
renderListAt :: Float -> Float -> Configuration -> [(String,Color)] -> Picture
renderListAt tx ty cfig = listTextPicturesAt tx ty cfig . map (\(str,col) -> color col $ text str)
renderListAt tx ty cfig = listTextPicturesAt tx (negate ty) cfig . map (\(str,col) -> color col $ text str)
-- concatMapPic (winScale cfig) . zipWith (listPairAt tx ty cfig) [0..]
--TODO put the following functions in an appropriate place