Files
loop/src/Dodge/SelectionList.hs
T

19 lines
514 B
Haskell

module Dodge.SelectionList (
getAvailableListLines,
) where
import Dodge.Data.ScreenPos
import Dodge.Data.Universe
import LensHelp
import Linear
getAvailableListLines :: LDParams -> Config -> Int
getAvailableListLines ldps cfig = floor ((dToBot - vgap) / itmHeight)
where
vgap = ldps ^. ldpVerticalGap
itmHeight = 20 * ldps ^. ldpScale + vgap
winy = fromIntegral $ cfig ^. windowY
dToBot =
winy * (ldps ^. ldpPos . spScreenOff . _y)
+ (ldps ^. ldpPos . spPixelOff . _y)