26 lines
797 B
Haskell
26 lines
797 B
Haskell
module Dodge.SelectionSections.Draw where
|
|
|
|
import Dodge.ScreenPos
|
|
import Control.Lens
|
|
import Data.Maybe
|
|
import Dodge.Data.CardinalPoint
|
|
import Dodge.Data.Config
|
|
import Dodge.Data.SelectionList
|
|
import Dodge.Render.List
|
|
import Picture.Base
|
|
|
|
drawSelectionSections :: SelectionSections a -> ListDisplayParams -> Configuration -> Picture
|
|
drawSelectionSections sss ldps cfig =
|
|
translateScreenPos cfig (ldps ^. ldpPos) $
|
|
listPicturesYgapScaleYoff
|
|
(_ldpVerticalGap ldps)
|
|
(_ldpScale ldps)
|
|
0
|
|
pics
|
|
<> thecursor'
|
|
where
|
|
thecursor' = fromMaybe mempty $ do
|
|
(i, j) <- sss ^? sssExtra . sssSelPos . _Just
|
|
return $ selSecDrawCursor 15 [North, South, West] ldps sss i j
|
|
pics = foldMap _ssShownItems (_sssSections sss)
|