Remove cursor type from ListDisplayParams

This commit is contained in:
2024-10-25 17:41:37 +01:00
parent bd505b072a
commit 6424899afd
7 changed files with 252 additions and 208 deletions
+22 -7
View File
@@ -1,4 +1,7 @@
module Dodge.SelectionSections.Draw where
module Dodge.SelectionSections.Draw
( drawSelectionSections
, drawSSCursor
) where
import Control.Lens
import Dodge.Data.Config
@@ -7,14 +10,26 @@ import Dodge.Render.List
import Dodge.ScreenPos
import Picture.Base
drawSelectionSections :: SelectionSections a -> Maybe (Int,Int) -> ListDisplayParams -> Configuration -> Picture
drawSelectionSections sss msel ldp cfig =
drawSelectionSections
:: SelectionSections a
-> ListDisplayParams
-> Configuration
-> Picture
drawSelectionSections sss ldp cfig =
translateScreenPos cfig (ldp ^. ldpPos) $
drawListYgapScaleYoff
(_ldpVerticalGap ldp)
(_ldpScale ldp)
0
pics
<> selSecDrawCursor 15 ldp sss msel
where
pics = foldMap _ssShownItems (_sssSections sss)
(foldMap _ssShownItems (_sssSections sss))
drawSSCursor
:: SelectionSections a
-> Maybe (Int,Int)
-> ListDisplayParams
-> CursorDisplay
-> Configuration
-> Picture
drawSSCursor sss msel ldp curs cfig =
translateScreenPos cfig (ldp ^. ldpPos) $
selSecDrawCursor 15 ldp curs sss msel