Move drawing of selection sections
This commit is contained in:
@@ -0,0 +1,26 @@
|
|||||||
|
module Dodge.SelectionSections.Draw where
|
||||||
|
|
||||||
|
import Dodge.Data.CardinalPoint
|
||||||
|
import Control.Lens
|
||||||
|
import Data.Maybe
|
||||||
|
import Picture.Data
|
||||||
|
import Dodge.Data.Config
|
||||||
|
import Dodge.Render.List
|
||||||
|
import Dodge.Data.SelectionList
|
||||||
|
|
||||||
|
drawSelectionSections :: SelectionSections a -> ListDisplayParams -> Configuration -> Picture
|
||||||
|
drawSelectionSections sss ldps cfig =
|
||||||
|
listPicturesAtScaleOff
|
||||||
|
(_ldpVerticalGap ldps)
|
||||||
|
(_ldpScale ldps)
|
||||||
|
(_ldpPosX ldps)
|
||||||
|
(_ldpPosY ldps)
|
||||||
|
cfig
|
||||||
|
0
|
||||||
|
pics
|
||||||
|
<> thecursor'
|
||||||
|
where
|
||||||
|
thecursor' = fromMaybe mempty $ do
|
||||||
|
(i, j) <- sss ^? sssExtra . sssSelPos . _Just
|
||||||
|
return $ selSecDrawCursor 15 [North, South, West] cfig ldps sss i j
|
||||||
|
pics = foldMap _ssShownItems (_sssSections sss)
|
||||||
Reference in New Issue
Block a user