Work on mouse selection in options menu

This commit is contained in:
2023-05-10 10:02:37 +01:00
parent ab714d63db
commit cc42a5e124
10 changed files with 130 additions and 88 deletions
+11 -11
View File
@@ -1,23 +1,23 @@
module Dodge.SelectionSections.Draw where
import Picture.Base
import Dodge.Data.CardinalPoint
import Dodge.ScreenPos
import Control.Lens
import Data.Maybe
import Dodge.Data.CardinalPoint
import Dodge.Data.Config
import Dodge.Render.List
import Dodge.Data.SelectionList
import Dodge.Render.List
import Picture.Base
drawSelectionSections :: SelectionSections a -> ListDisplayParams -> Configuration -> Picture
drawSelectionSections sss ldps cfig =
toTopLeft cfig ((translate (ldps ^. ldpPosX) (negate $ ldps ^. ldpPosY) $ listPicturesYgapScaleYoff
(_ldpVerticalGap ldps)
(_ldpScale ldps)
0
pics
)
<> thecursor'
)
translateScreenPos cfig (ldps ^. ldpPos) $
listPicturesYgapScaleYoff
(_ldpVerticalGap ldps)
(_ldpScale ldps)
0
pics
<> thecursor'
where
thecursor' = fromMaybe mempty $ do
(i, j) <- sss ^? sssExtra . sssSelPos . _Just