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 / 2 + winy * (ldps ^. ldpPos . spScreenOff . _y) + (ldps ^. ldpPos . spPixelOff . _y)